Default button setup

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I have 3 objects on my page (textbox,button and linkbutton)

When I put something in my textbox and hit "enter", the page gets posted,
but nothing happens. I don't go to either of the functions that both
buttons are set up for.

If I push the buttons directly, it works fine.

The Button is the first button on the page and the one I want to be default.
Is there something I have to do to make it a default button?

Thanks,

Tom
 
its a minor bug in IE. its supposed to post the first button, but fails in
this simple case (more controls it works better). google this newsgroup for
help on implementing a default button of your choice.

-- bruce (sqlwork.com)
 
Bruce Barker said:
its a minor bug in IE. its supposed to post the first button, but fails in
this simple case (more controls it works better). google this newsgroup
for help on implementing a default button of your choice.

Found it.

If I put

Page.RegisterHiddenField("__EVENTTARGET", "btnSearch")

in the Page_Load event - it seems to work.

Thanks,

Tom
 
Back
Top