codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Getting onblur to call an ASP.NET function.  AHenry at 18:42 on Wednesday, July 27, 2005
 

Base Question
Is it possible to call an ASP.NET function with onblur? I've seen javascript but no examples of ASP.NET.

Details
I have a standard ASP.NET application and in it I've created a Datagrid to display data pulled from a table (of course).

I've added a footer to the datagrid which is a blank template of all the row above it, to allow the user to enter new rows. What I want is when the user loses focus of each text box for it to call an asp.net function which will test to see if all the data is entered and if it is, add it to the database and reload the datagrid with the new data in it.

Code
Example of one of the textboxes with the onblur.
<asp:TextBox id="txtNewCreditAmount" runat="server" Width="80" onfocus="javascript: this.select();" onkeypress="javascript: ValidateHours(event);" onblur="AddEntry()" />

Any help would be appreciated. Thanks.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  How to add tooltip on dropdown
•  Re: use a Cookie to Request to a Site ?!
•  Collapsible table?
•  onClick Event Handler
•  JavaScript/DHTML newbie -- general question
•  XML with child-parent relations
•  Re: Use of VB .NET
•  Re: SQL Statement
•  Template


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005