hi...
in my project i have a panel named as bodyPanel.And this panel control have number of buttons which are generated by using for loop. i want to store the selected buttons in a list type through it's name. and after press the submit button...the selected controls in the panel must be in disable state ..and remaining all are in enabled state... i tried it by using 'foreach' loop and 'for' loop but i am failed to achieve it....
please help me....

Nitesh KejriwalPosted May 14, 2014, 3:24 AM
You will need to do the following steps-
1. Create a dictionary object with
Naredla NitheshPosted May 14, 2014, 3:08 AM
assume that we need to develop a project for booking tickets for a movie theater.and we are generating the seats buttons of the theater using for loop.and when the user clicks on the buttons .the respective buttons must be selected...and when the user clicks on proceed button.the selected buttons must be stored in list item and depending up on the list content the buttons in the panel will be in disable state.
Nitesh KejriwalPosted May 14, 2014, 2:58 AM
Naredla NitheshPosted May 14, 2014, 2:56 AM
1.buttons which are in panel
2.proceed button on form(not in panel) for submitting form
if we click on submit button the selected buttons in panel control will go into disable state..
Nitesh KejriwalPosted May 14, 2014, 2:48 AM
2. Disable the panel
2. Enable the clicked button.
protected void btn_Click(object sender, EventArgs e)
{
Button b = (Button)sender;
if(b!=null)
{
pnl.Enabled=false;
b.Enabled=true;
}
}
Naredla NitheshPosted May 14, 2014, 2:45 AM
Nitesh KejriwalPosted May 14, 2014, 2:38 AM
Naredla NitheshPosted May 14, 2014, 2:33 AM
Nitesh KejriwalPosted May 14, 2014, 2:23 AM