How to disabled button after user have clicked the button before in asp.net using C# -
i creating seat reservation system. in system, if user select seat 1 , proceed till end, when system come again (i have button linked first page last page), seat 1 should disabled , cannot chose already. somehow code still allows choose. why that?
i using code:
if (seat1 == "reserved") { imagebutton1.imageurl = "seatreserved.png"; imagebutton1.enabled = false; }
the image change know value "reserved" had passed page. somehow imagebutton1.enabled = false; did not work. please help, thank you.
you not saving state of actions anywhere @ least don't explain it. when reserve seat in app save value of seat in source-> db xml or whatever like. after on next opening of app load reserved seats source , make disable buttons.
if use db , have 2 tables event , reserving seats. when click on button inserting data in reserving eventid='the id of event' , seatnumber number of seat.
after when go event again load data reserving table event , disable needed.
Comments
Post a Comment