My thoughts regarding ASP.NET, C#, programming practices, and more...
reading
You Should Read archives
blogs I read
|
Wednesday, December 28, 2005Set Focus Using Javascript and C#
I ran into some trouble trying to get a Textbox on a User Control to have the cursor in it by default. I tried several Javascript tricks but nothing worked.
Content copyright ©2003-2006 Tod Birdsall
I finally tried adding the Javascript to the page through the code behind file using C# to see if that would help, and it did. Here is the code I used:
|