postback issue

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hi,

on my page I have a menu of buttons on the left side and in the middle a
multiview with several views.
On those views I have textboxes with and without postback.

The problem is that if the user hits the Enter button after entering some
information in a textbox with postback set to false, it still does a
postback. It does the postback of the top button in my menu.

How can I prevent this? I just don't want the page to postback when the user
hits the enter button on certain fields.

rg,
Eric

ps. Happy holidays!!
 
Eric said:
Hi,

on my page I have a menu of buttons on the left side and in the middle a
multiview with several views.
On those views I have textboxes with and without postback.

The problem is that if the user hits the Enter button after entering some
information in a textbox with postback set to false, it still does a
postback. It does the postback of the top button in my menu.

How can I prevent this? I just don't want the page to postback when the user
hits the enter button on certain fields.

rg,
Eric

ps. Happy holidays!!

Found one solution:

ctrl.Attributes.Add("onkeydown", "return (event.keyCode!=13);")

rg,
Eric
 
Back
Top