Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > page_load is executed twice when using validation controls

Reply
Thread Tools

page_load is executed twice when using validation controls

 
 
=?Utf-8?B?TWFnZXNo?=
Guest
Posts: n/a
 
      08-25-2004
Hi,

I have a search screen with a textbox and a button (server controls). The
page has to be submitted when the user hits the enter key in the textbox. The
code i am using to do this is..

this.txtCorpId.Attributes["onkeydown"] = "if(event.keyCode == 13){ if
(Page_ClientValidate()) document.getElementById('btnSearch').click();}";

But i find that the page_load event is executed twice when the enter key is
hit. The page works fine when submitted by clicking the button. Can anyone
help in solving this??

Thanks
Magesh


 
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
Page_Load not executed Jeff ASP .Net 1 05-04-2009 12:10 PM
Page_Load is not executed in codebehind ericw3@gmail.com ASP .Net 3 02-03-2006 08:21 PM
Page_Load(...) not executed in MainWebForm.aspx Richard Lionheart ASP .Net 2 10-15-2005 06:15 AM
Why does page_load fire twice when inheriting from a common overridable Page_Load bminder ASP .Net 1 02-23-2004 08:54 PM
Event executed twice Alberto ASP .Net 1 01-12-2004 04:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57