Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
| 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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 13th, 2006, 03: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...

  #2 (permalink)  
Old June 14th, 2006, 02:43 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

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))
            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."

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03:32 AM
calling a codebehind function on onblur event vishnupriya.kamalakaram ASP.NET 1.0 and 1.1 Basics 2 July 7th, 2006 08: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 09:07 PM

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

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.