Set a button as default "enter" input.

  • Thread starter Thread starter Jensen bredal
  • Start date Start date
J

Jensen bredal

Hello,
I have an html submit button wich i have converted into a server
control(ascx) .
I want it serverside click event to be fired on "enter".

How can this be achieved?

Many thanks in advance
JB
 
In Page_Load (at least generally), do the following:

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

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top