| | |
Disable Web Control Button
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2005
Posts: 50
Reputation:
Solved Threads: 0
I need some assistance with disabling web control button. First, i need to check if the value related to the button is in the listbox. This is done.
If the item is in the listbox, disable the button. I am thinking the possibility of using a loop statement. However, i do not know how to write it to check if the item related to the button matched before disabling button.
If the item is in the listbox, disable the button. I am thinking the possibility of using a loop statement. However, i do not know how to write it to check if the item related to the button matched before disabling button.
•
•
Join Date: Jun 2005
Posts: 50
Reputation:
Solved Threads: 0
Server Side.
I am doing a movie booking page and the seats are represented by web control buttons. They are to be disabled when the seats booked values are listed in a listbox known as listbox_seatsbooked.
From the listbox_seatsbooked, it is suppose to check if the value of the button matches the ones listed in the listbox to disable the button from being clicked again. (Seats can't be booked) again.
I have included an image of how it looks for better clarifications.
http://i1.tinypic.com/ncim4l.jpg
I am doing a movie booking page and the seats are represented by web control buttons. They are to be disabled when the seats booked values are listed in a listbox known as listbox_seatsbooked.
From the listbox_seatsbooked, it is suppose to check if the value of the button matches the ones listed in the listbox to disable the button from being clicked again. (Seats can't be booked) again.
I have included an image of how it looks for better clarifications.
http://i1.tinypic.com/ncim4l.jpg
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
you made a small error... you didnt set 'name' to anything.
need to be
•
•
•
•
Dim name as string
Dim item As ListItem = listbox_seatsbooked.Items.FindByText(name)
If Not item Is Nothing Then
ASP.NET Syntax (Toggle Plain Text)
Dim name as string = thebutton.tag 'that is assuming you set the tag to be the seat number such as A1 on btna1, A2 on btna2 etc. Dim item As ListItem = listbox_seatsbooked.Items.FindByText(name) If Not item Is Nothing Then
•
•
Join Date: Jun 2005
Posts: 50
Reputation:
Solved Threads: 0
Hi f1_fan, thanks for ur assistance.
I cannot find a declaration known as .tag in asp.net (codebehind vb.net). I tried using C# converter to VB.net.
Any suggestions?
I cannot find a declaration known as .tag in asp.net (codebehind vb.net). I tried using C# converter to VB.net.
Any suggestions?
•
•
•
•
Originally Posted by f1 fan
you made a small error... you didnt set 'name' to anything.
need to be
ASP.NET Syntax (Toggle Plain Text)
Dim name as string = thebutton.tag 'that is assuming you set the tag to be the seat number such as A1 on btna1, A2 on btna2 etc. Dim item As ListItem = listbox_seatsbooked.Items.FindByText(name) If Not item Is Nothing Then
![]() |
Similar Threads
- Printing using Web Control Print button VB.NET (JavaScript / DHTML / AJAX)
- Printing using Web Control Print button. (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: hopw to transmit vedio and audio
- Next Thread: asp.net deployment problem
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox click commonfunctions control css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iframe iis javascript listbox login microsoft mono mouse mssql multistepregistration news novell numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers






