Controlling Panels via RadioButtons
-
hello all, Its a well known fact that Panels in ASP.NET can be controlled using control. My questions is if we could control those same Panels using the control. Now this should be done in this way: 1. Lets say there are 4 RadioButtons(of the same group) and 4 corresponding panels. 2. User chooses a RadioButton. 3. The corresponding panel opens up. NOT in this way: 1. There are 4 RadioButtons(of the same group), 4 corresponding panels and a regular button. 2. User chooses a RadioButton. 3. User clicks on the regular button (lets say its the "Submit" button). 3. The corresponding panel opens up. Any input is appreciated. Regards, Tiruvan
-
hello all, Its a well known fact that Panels in ASP.NET can be controlled using control. My questions is if we could control those same Panels using the control. Now this should be done in this way: 1. Lets say there are 4 RadioButtons(of the same group) and 4 corresponding panels. 2. User chooses a RadioButton. 3. The corresponding panel opens up. NOT in this way: 1. There are 4 RadioButtons(of the same group), 4 corresponding panels and a regular button. 2. User chooses a RadioButton. 3. User clicks on the regular button (lets say its the "Submit" button). 3. The corresponding panel opens up. Any input is appreciated. Regards, Tiruvan
This has little to nothing to do with ASP.NET - this requires client-side scripting. ASP.NET is a service that runs on the server. Without fetching a new page, ASP.NET isn't involved (this is the nature of HTTP). You can generate a class that exhibits this behavior by emiting a script that reacts to the 4 radio buttons and uses scripting and CSS styles to show and hide the panels (all of which must be written to the HTML writer) appropriately. Fortunately, Microsoft has already unofficially done this. See the Microsoft IE WebControls at http://www.asp.net/ControlGallery/default.aspx?Category=38&tabindex=2[^]. The MultiPage and TabStrip controls are what you would want. BTW, this question would be more appropriate in the ASP.NET forum.
Microsoft MVP, Visual C# My Articles