N
news
Can I use ENTER to submit my form using C#?
I have used
Page.RegisterHiddenField("__EVENTTARGET", "btnFind");
This works SOMETIMES but not all the time.
I saw
http://msdn.microsoft.com/library/d...systemwindowsformsformclassactivatedtopic.asp
and
http://msdn.microsoft.com/library/d...stemwindowsformscontrolclassgotfocustopic.asp
which explains that ENTER is not used since the Activate is used for Forms.
I understand the logic but I still cant get my forms to always submit on
ENTER and instead it uses the first control (a list) and ends up being
redirected.
Enter has been used for decades to submit a request dating back to "dumb
terminals" and even typewriters. So it makes sense to use the ENTER to
submit forms.
I have used
Page.RegisterHiddenField("__EVENTTARGET", "btnFind");
This works SOMETIMES but not all the time.
I saw
http://msdn.microsoft.com/library/d...systemwindowsformsformclassactivatedtopic.asp
and
http://msdn.microsoft.com/library/d...stemwindowsformscontrolclassgotfocustopic.asp
which explains that ENTER is not used since the Activate is used for Forms.
I understand the logic but I still cant get my forms to always submit on
ENTER and instead it uses the first control (a list) and ends up being
redirected.
Enter has been used for decades to submit a request dating back to "dumb
terminals" and even typewriters. So it makes sense to use the ENTER to
submit forms.