i have a pop up on the index change of a combo box and i need to get the result of the confirm box in the code behind:
Protected Sub service_list_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles service_list.SelectedIndexChanged
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "confirm", x.javaMsg("Do you
want to choose a date?"), True)
If user clicks ok
GridView1.DataSource = x.selectCNT(service_list.SelectedValue)
GridView1.DataBind()
End Sub
this is my function:
Public Function javaMsg(ByVal message As String) As String
Dim sb As New System.Text.StringBuilder()
sb.Append("window.onload=function(){")
sb.Append("confirm('")
sb.Append(message)
sb.Append("')};")
Return sb.ToString()
End Function
note that i'm using asp.net with vb.net