Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return = autopostback
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00907583
Message ID:
00907607
Views:
6
Thanks...


>Eric,
>
>You will have to use DHTML in order to make that happen.
>
>Place the below code in the PageLoad routine, inside of the "If Not IsPostBack" statement... Be sure the change
txtWhatever
to your text control name.
>
>VB Example:
>
>
>If txtWhatever.Attributes.Item("onKeyDown") Is Nothing Then
>    txtWhatever.Attributes.Add("onKeyDown", _
>    "if(event.keyCode == 13){ try { event.cancel = true; document.Form1.submit();} catch(e) { }}")
>Else
>    txtWhatever.Attributes.Add("onKeyDown", _
>    txtWhatever.Attributes.Item("onKeyDown").ToString & _
>    "if(event.keyCode == 13){ try { event.cancel = true; document.Form1.submit();} catch(e) { }}")
>End If
>
>
>Hope that helps : )
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Previous
Reply
Map
View

Click here to load this message in the networking platform