Please help when i add the bindgrid the message box does appear but after removing it the message box comes.
how can i have the bindgrid code included because it is necessary when i am executing this task
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
dropDownList.ClearSelection()
' Dim item As Object = dropDownList.Items.FindByValue(streamr)
' If item IsNot Nothing Then
'item.Selected = True
'End If
' Dim country As String = TryCast(Row.FindControl("lblCountry"), Label).Text
Dim country As String = "Please select"
If dropDownList.Items.FindByValue(country) IsNot Nothing Then
dropDownList.Items.FindByValue(country).Selected = True
End If
Dim message As String = "alert('No Stream is Allowed to Cream Class.')"
ScriptManager.RegisterClientScriptBlock(TryCast(sender, Control), Me.GetType(), "alert", message, True)
BindGrid()
Exit Sub