Re: Choosing whitch button will act as submit button



Yes, This will prevent any enter key submiting. However, you can extend this
to allow the one you want to submit.

http://www.trainingon.net/Articles/Art147/Art147.html



--

Best Regards - OHM

http://TrainingOn.net
--------------------------------------------------


"Bjorn Sagbakken" <bjo-sag@xxxxxxxxx> wrote in message
news:q7CdnefayoSXR-bYRVnzvA@xxxxxxxxxxxxxx
Hello.

There maybe an simple answer to this, but sometimes one get a strange
blindness when working intensely on one single problem.

I'm using ASP.NET 2003, building pages that include 3 user controls
(banner, top-menu and sub-menu). The top-menu contains like five
asp:buttons.

Further down the form there is search field with another asp:button. And I
naturally want this button to act as submit button in the sense that when
the user push the [enter] button in the search field. Well, this doesn't
happen. The first (left) button on the usercontol top-menu fires, whitch
brings the user to completely different page (whitch is the intention when
the user actually clicks this button)

I have tried to add another form tag for this, but no thank you, only one
server side form tag, please!

I have tried various ugly workarounds, like passing session variables so
that the button in the top-menu actually clicks back on the other button.
No luck.

Anyone with an idea on how to pick whitch button that will act as submit
button, when usercontrols with buttons are included?

Thanks.


Regards
Bjorn



.


Loading