Protected Sub SearchclerkButton_Click(sender As Object, e As EventArgs) Handles SearchclerkButton.Click
Dim cmd2 As New SqlCommand
Dim con2 As New SqlConnection
con2.ConnectionString = SqlDataSource1.ConnectionString
con2.Open()
cmd2.Connection = con2
cmd2.CommandText = "select coalesce(cleclerkfirstname, '') + ' ' + coalesce(cleclerklastname, '') from cleclerk where cleclerklocation = '" & ClerkDropDownList1.SelectedItem.Text & "'"
ClerkLabel1.Text = cmd2.ExecuteScalar.ToString()
Page.ClientScript.RegisterStartupScript(Me.[GetType](), "popupWin", "alert('Your message here')", True)
End Sub
I hope this will work. thank you.