Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
chiragvm
Yak Posting Veteran
65 Posts |
Posted - 2006-10-19 : 01:36:36
|
hi to all i want to set focous on my textbox when the page load by default course set on my textbox i using this code but it not working proper Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Page.RegisterStartupScript("SetFocus", "<script language='Jscript'> document.getElementById('txtpassword').focus(); </script>") End Subi use uper code in my form but not work proper help me it urgunt |
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2006-10-19 : 07:29:10
|
i use this simple function Shared Sub SetFocus(ByVal ctl As System.Web.UI.Control, ByVal pg As System.Web.UI.Page) Dim s As String s = "<SCRIPT language=""javascript""" s &= ">document.getElementById('" & ctl.ID & "').focus() </SCRIPT>" pg.RegisterStartupScript("focus", s) End Sub [Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|