Protected Sub s1click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles s1.Click
If s1.ImageUrl = "~/Images/available_seat_img.gif" Then
s1.ImageUrl = "~/Images/selected_seat_img.gif"
Button1.Enabled = True
TextBox1.Text = s1.ID.ToString() + ","
ElseIf s1.ImageUrl = "~/Images/selected_seat_img.gif" Then
' Button1.Enabled = False
s1.ImageUrl = "~/Images/available_seat_img.gif"
TextBox1.Text = TextBox1.Text.Replace("s1", "")
End If
End Sub
when i run this code … the second Elseif condition will not work…
whats the problem with this code snippet …
You should check to see what the value is set to at the start of the function (with a
MessageBoxor something similar). It may not be what you expect.If
s1.ImageUrlis set to"~/Images/selected_seat_img.gif", then it should work fine.