S
sck10
Hello,
I am trying to set the focus on an object using the following: However, I
am getting the following error:
The name Clientscript does not exist in the current context.
protected void SetFocusControl(Control FocusControl)
{
StringBuilder script = new StringBuilder();
string ClientID = FocusControl.ClientID;
script.Append("<script language='javascript'>");
script.Append("document.getElementById('");
script.Append(ClientID);
script.Append("').focus();");
script.Append("</script>");
Clientscript.RegisterStartupscript("SetFocusControl", script);
}
I am trying to set the focus on an object using the following: However, I
am getting the following error:
The name Clientscript does not exist in the current context.
protected void SetFocusControl(Control FocusControl)
{
StringBuilder script = new StringBuilder();
string ClientID = FocusControl.ClientID;
script.Append("<script language='javascript'>");
script.Append("document.getElementById('");
script.Append(ClientID);
script.Append("').focus();");
script.Append("</script>");
Clientscript.RegisterStartupscript("SetFocusControl", script);
}