Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RegisterStartupScript

Status
Not open for further replies.

lfc77

Programmer
Aug 12, 2003
218
GB
I'm trying to register a script to enable me to set the foucs to a particular object on my ASP.NET page.

//Script for focus
string Focus = "";
Focus += &quot;\n<script language=JavaScript id='Focus'>\n&quot;;
Focus += &quot;Log.txtDCUG.DialledNum.Focus();\n&quot;;
Focus += &quot;Log.txtDCUG.DialledNum.Select();\n&quot;;
Focus += &quot;</script>&quot;;

//Check whether they are already registered
if(!IsStartupScriptRegistered(&quot;Focus&quot;))
{
//Register the script
RegisterStartupScript(&quot;Focus&quot;,Focus);
}

Can anybody tell me what is wrong with my syntax, as I'm the syntax when making reference to Javascripts.


Thanks,

Mike

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top