Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > MVP is this a BUG? Adding button element corrupts textbox event!!!

Reply
Thread Tools

MVP is this a BUG? Adding button element corrupts textbox event!!!

 
 
Kathy Burke
Guest
Posts: n/a
 
      07-18-2003
Hi, I posted earlier about my textbox textchanged event no longer
firing. I've found the cause but NOT the reason.

On a fairly simple aspx form, I added an html button to fire a
client-side script of open.window. As soon as this was added, the
textchanged of my textbox no longer fires. I checked that the Handles
part of the sub statement is still there.

EVEN WHEN I DELETE THE NEW BUTTON, the problem remains. I see no code
changes but must revert to a backup to restore the event.

PLEASE HELP...this is serious problem for me.

Thanks.

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Ravikanth[MVP]
Guest
Posts: n/a
 
      07-18-2003
Hi

Use the AutoPostBack property to specify whether an
automatic postback to the server will occur whenever the
user modifies the text in the TextBox control and then
tabs out of the control.

Noteostback only occurs when the text box loses focus
after the contents are changed.

HTH
Ravikanth


>-----Original Message-----
>Hi, I posted earlier about my textbox textchanged event

no longer
>firing. I've found the cause but NOT the reason.
>
>On a fairly simple aspx form, I added an html button to

fire a
>client-side script of open.window. As soon as this was

added, the
>textchanged of my textbox no longer fires. I checked

that the Handles
>part of the sub statement is still there.
>
>EVEN WHEN I DELETE THE NEW BUTTON, the problem remains.

I see no code
>changes but must revert to a backup to restore the event.
>
>PLEASE HELP...this is serious problem for me.
>
>Thanks.
>
>Kathy
>
>*** Sent via Developersdex http://www.developersdex.com

***
>Don't just participate in USENET...get rewarded for it!
>.
>

 
Reply With Quote
 
 
 
 
Kathy Burke
Guest
Posts: n/a
 
      07-18-2003
Thanks for responding...but the autopostback isn't the problem. The
textbox event worked FINE (fired on user hitting <Enter>) until I added
a button control and set the onclick to be an open.window script. I
still need an answer...help!

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Kathy Burke
Guest
Posts: n/a
 
      07-18-2003
After several hours of hair pulling, finally got it working. It was a
combination of things. It would only work if I did NOT use an inline
script in the html button. In the end, for those new users who may have
a similar problem, I did the following:

(1) Added the onclick script in the <head> of the html.

(2) Used an asp:button (vs. html) and put the following code in the page
load sub (if not postback):

buttonname.attributes.add("onclick", "name_of_script();return false;")

the return false will remove/disable the "submit" function that asp.net
adds in runtime.

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning: MVP.org is not a Microsoft MVP site Larry Samuels MCSE 23 02-01-2004 09:28 PM
Warning: MVP.org is not a Microsoft MVP site Larry Samuels Microsoft Certification 21 02-01-2004 09:28 PM
Re: Warning: MVP.org is not a Microsoft MVP site =?Windows-1252?Q?Frisbee=AE_MCNGP?= MCSD 5 02-01-2004 09:28 PM
Re: Warning: MVP.org is not a Microsoft MVP site =?Windows-1252?Q?Frisbee=AE_MCNGP?= MCSD 6 01-20-2004 01:02 AM
Warning: MVP.org is not a Microsoft MVP site Larry Samuels MCDST 8 01-13-2004 03:35 PM



Advertisments