Please help how can i undo the selected DropDownList value and set the DropDownList to a particular value in case of an error message
Using Com As New SqlCommand("Select * from Controlcream where stream = '" & streamr & "'", Con)
Using RDR = Com.ExecuteReader()
If RDR.HasRows Then
Dim message As String = "alert('No Stream is Allowed to Cream Class.')"
ScriptManager.RegisterClientScriptBlock(TryCast(sender, Control), Me.GetType(), "alert", message, True)
dropDownList.ClearSelection()
Dim item As Object = dropDownList.Items.FindByText(streamr)
If item IsNot Nothing Then
item.Selected = True
End If
Exit Sub