Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Asp.Net equivalent of VFP control.setfocus
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00708825
Message ID:
00709688
Views:
23
Imports Cathy.kicks.butt :) Cathy this is good stuff. I am using an alternate method from Douglas, but its good to have more than one way to skin the proverbial cat.

>Another approach, although it is still javascript, is to include code in your code behind. Just put the following inside of your Page_Load method:
>
>
>Dim script As String = "<script language=javascript> document.forms[0]." & _
>    txtMyControl.ClientID.ToString() + ".focus();</script>"
>RegisterStartupScript("focus", script)
>
>
>Just substitute "txtMyControl" with the name of the Control you want to set focus to.
[snip]
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Reply
Map
View

Click here to load this message in the networking platform