p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 13th, 2006, 04:00 AM
Registered User
 
Join Date: Jun 2006
Location: , , India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to call a codebehin function on onblur event??

Hai All,

How can we call a codebehind function on onblur event of a control in asp.net 1.1?The control may be a web server control,html control,html server control or a web user control.
Actually, we can call a script function on such an event.But, how to call a codebehind one?

Or else, how to call a codebehind function from a javascript function?
Any suggestions?? Please welcome...

-Priya
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old June 14th, 2006, 03:43 PM
Wrox Author
Points: 12,827, Level: 49
Points: 12,827, Level: 49 Points: 12,827, Level: 49 Points: 12,827, Level: 49
Activity: 15%
Activity: 15% Activity: 15% Activity: 15%
 
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
Send a message via AIM to dparsons
Default

This is generally what you are trying to do:

            strJavaScript.Append("if (typeof(Page_ClientValidate) == 'function') { ")
            strJavaScript.Append("if (Page_ClientValidate() == false) { return false; }} ")
            strJavaScript.Append("this.value = 'Please wait...';")
            strJavaScript.Append("this.disabled = true;")
            strJavaScript.Append(Page.GetPostBackEventReferenc e(Me.btnSubmit))
            strJavaScript.Append(";")
            btnSubmit.Attributes.Add("onClick", strJavaScript.ToString)

This javascript is added to a button and it disables the button on the client side and calls the btnSubmit_click() event in my code behind when a user clicks it. You get the general idea and should be able to make it work with your application.

"The one language all programmers understand is profanity."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Call a Button's click event sams ASP.NET 1.0 and 1.1 Professional 3 July 24th, 2007 04:32 AM
calling a codebehind function on onblur event vishnupriya.kamalakaram ASP.NET 1.0 and 1.1 Basics 2 July 7th, 2006 09:25 AM
How to call javascript function from VB function vinod_yadav1919 VB How-To 0 February 13th, 2006 06:03 AM
tabindexes don't work with onBlur function in Net elisabeth Javascript 14 November 24th, 2004 11:07 AM
Alternative to onBlur() event ashu_gupta75 Classic ASP Basics 3 April 30th, 2004 10:07 PM



All times are GMT -4. The time now is 07:10 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc