Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Dim tb As TextBox = CType(Master.FindControl("txtMaster"), TextBox) Dim val As String = tb.ClientID Dim script As String = "<script>" & ControlChars.CrLf & " function PopulateMaster() {" & ControlChars.CrLf & " document.getElementById('" & val & "').value = 'Via Content Page.; " & ControlChars.CrLf & " }" & ControlChars.CrLf & " PopulateMaster();" & ControlChars.CrLf & " </script>" If (Not Page.ClientScript.IsStartupScriptRegistered("Mast")) Then Page.ClientScript.RegisterStartupScript(Me.GetType(), "Mast", script) End If End Sub
document.getElementsByClassName
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)