Setting Focus for textbox
-
Hi, In my web application am using Samrtnavigation in web.config file
<pages smartNavigation="true">
And when i try to set Focus for my text box, like
TextBox1.Focus()
it's not working. I've tried javascript and other stuffs. Can any one here to help? Pls
Regards n Thks Sam.M
-
Hi, In my web application am using Samrtnavigation in web.config file
<pages smartNavigation="true">
And when i try to set Focus for my text box, like
TextBox1.Focus()
it's not working. I've tried javascript and other stuffs. Can any one here to help? Pls
Regards n Thks Sam.M
-
-
Sorry friend. This is not working. I've tried. Do u've anyother solution for this?
Regards n Thks Sam.M
Try this code:
[VB.NET]
Page.RegisterStartupScript("SetFocus", _
"<script>document.getElementById('" & TextBox1.ClientID & _
"').focus();</script>")[C#]
Page.RegisterStartupScript("SetFocus", "<script>document.getElementById('" + TextBox1.ClientID + "').focus();</script>");
SSK. Anyone who says sunshine brings happiness has never danced in the rain.