Yama,
Insert the javascript using Page.RegisterStartupScript. Here's an example:
If Not page.IsStartupScriptRegistered("TextBoxFocus") Then
Dim StringBuilder As New System.Text.StringBuilder
With StringBuilder
.Append("<script language=""javascript"">" & vbCrLf)
.Append(vbTab & "<!--" & vbCrLf)
.Append(vbTab & vbTab & "document.getElementById('" &
webControl.ClientID & "').focus();" & vbCrLf)
.Append(vbTab & "//-->" & vbCrLf)
.Append("</script>" & vbCrLf)
End With
page.RegisterStartupScript("TextBoxFocus", StringBuilder.ToString)
End If
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche