message box not coming after adding update panel on my webpage
please help
Using Con As New SqlConnection(conString)
Con.Open()
Using Com As New SqlCommand("Select * from Controlcream where stream = '" & streamr & "'", Con)
Using RDR = Com.ExecuteReader()
If RDR.HasRows Then
' Response.Write("<script>alert('No Stream is Allowed to Cream Class');</script>")
Dim time2 As String = "No Stream is Allowed to Cream Class"
Dim script2 As String = "window.onload = function() { askConfirm('" & time2 & "'); };"
' ClientScript.RegisterStartupScript(Me.GetType(), "askConfirm", script2, True)
' ScriptManager.RegisterStartupScript(Me.GetType(), "askConfirm", script2, True)
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "Message", "alert('" + script2 + "');", True)
'
DropDownList.ClearSelection()
Dim item As Object = DropDownList.Items.FindByText("Please select")
If item IsNot Nothing Then
item.Selected = True
End If
ScriptManager.RegisterStartupScript(Me, [GetType](), "displayalertmessage", "Showalert();", True)
End If
End Using
End Using
End Using