Hi, can anyone tell me how to set cursor focus to one textbox eg. textbox1 after the form has been posted back?
In windows form using vb.net, we could use textbox1.setfocus(), but it seems cannot find this in asp.net.
Thanks!Focus of a textbox can only be acheived by using javascript.
Page.RegisterStartUpScript("setBoxFocus","var x = document.getElementById('" & myTextBox.clientID & "'); x.setFocus();")
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment