Focus

  • Thread starter Thread starter Guest
  • Start date Start date
use the setFocus() in javascript
you could find a lot of codes if you search in google.

hope it helps

weichung
 
Hi Sara!

Add this method to your class:

public void SetFocus(Control c) {
if (!Page.IsStartupScriptRegistered("SetFocus")) {
Page.RegisterStartupScript("SetFocus", "<script
language=\"JavaScript\">\n\tdocument.forms[0]." + c.ClientID +
".focus();\n</script>");
}
}


Greetings, Ralf
 
Back
Top