当我点击红色座位时,我希望它回到之前的蓝色座位图像。
asp中的代码;
<asp:ImageButton ID="s12" ImageUrl="~/Images/available_seat_img.gif" OnClick= "s12_Click" runat="server" />12
这是在我的页面加载后面的代码;
Protected Sub s12_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles s12.Click
Dim available = "~/Images/available_seat_img.gif"
Dim booked = "~/images/booked_seat_img.gif"
If s12.ImageUrl = available Then
s12.ImageUrl = booked
Else
s12.ImageUrl = available
End If
End Sub