473,511 Members | 14,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying panel between two radiobuttonlist listitems

30 New Member
Dear All
Iam new to asp.net. I want to display a panel between two radio buttonlist
listitems. I have wriiten in comments in code to display panel position.
Here is my code

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadiobtnlistPanel.aspx.cs" Inherits="RadiobtnlistPanel" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml" >
  6. <head runat="server">
  7.     <title>Untitled Page</title>
  8. </head>
  9. <body>
  10.     <form id="form1" runat="server">
  11.     <div>
  12.         <table>
  13.             <tr>
  14.                 <td>
  15.                 <p>
  16.                     <asp:RadioButtonList ID="RadioButtonList1"  AutoPostBack="true" RepeatDirection="Vertical" runat="server" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
  17.                      <asp:listitem Text="Panel1" Selected="True"></asp:listitem>
  18.  
  19. //Panel1  should display here
  20.  
  21.                      <asp:ListItem Text="Panel2"></asp:ListItem>
  22.  
  23. //Panel2 should display here
  24.  
  25.                     </asp:RadioButtonList>
  26.                 </p>
  27.                 <p>
  28.                    <asp:Panel ID ="Panel1" runat="server">This is First Panel</asp:Panel>
  29.                    <asp:Panel ID ="Panel2" runat="server" Visible="false">This is my second panel</asp:Panel>
  30.                 </p>     
  31.                 </td>
  32.             </tr>
  33.         </table>
  34.     </div>
  35.     </form>
  36. </body>
  37. </html>
Regards
Yogesh
Jun 26 '08 #1
2 1698
kenobewan
4,871 Recognized Expert Specialist
Although you are using asp.net objects this seems like a simple html problem.
Jun 26 '08 #2
Frinavale
9,735 Recognized Expert Moderator Expert
Have you tried putting panels there??

eg:

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadiobtnlistPanel.aspx.cs" Inherits="RadiobtnlistPanel" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml" >
  6. <head runat="server">
  7.     <title>Untitled Page</title>
  8. </head>
  9. <body>
  10.     <form id="form1" runat="server">
  11.     <div>
  12.         <table>
  13.             <tr>
  14.                 <td>
  15.                 <p>
  16.                     <asp:RadioButtonList ID="RadioButtonList1"  AutoPostBack="true" RepeatDirection="Vertical" runat="server" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
  17.                      <asp:listitem Text="Panel1" Selected="True"></asp:listitem>
  18.  
  19.  <asp:Panel ID ="Panel1" runat="server">This is First Panel</asp:Panel>
  20.                      <asp:ListItem Text="Panel2"></asp:ListItem>
  21.  
  22.                    <asp:Panel ID ="Panel2" runat="server" Visible="false">This is my second panel</asp:Panel>
  23.                     </asp:RadioButtonList>
  24.                 </p>
  25.                 <p>
  26.  
  27.  
  28.                 </p>     
  29.                 </td>
  30.             </tr>
  31.         </table>
  32.     </div>
  33.     </form>
  34. </body>
  35. </html>
Jun 27 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1911
by: Harris Reynolds | last post by:
Hi there. I'm having some fundamental issues using the RadioListButton control. I initialize it with values from from a database when the page load with: item1 = new ListItem( "listing from...
2
2765
by: dhnriverside | last post by:
Hi guys I have a radiobuttonlist with 3 listItems, with values 0, 1 and 2 respectively. My database stores the number, but how do I set the selected on the brl to correspond with the...
2
1641
by: tomh | last post by:
I need to have TextBoxes included in the ListItems of a RadioButtonList. So it would look something like this: <asp:RadioButtonList runat="server" id="rblError" CellPadding="3"> ...
1
1248
by: Chris Kettenbach | last post by:
Good Afternoon Everyone, Is there any way to set the font of the listitems inside a radiobutton list? I have tried spans, tds, and tables and I can seem to get it to work. The html redered by...
5
5091
by: Jim | last post by:
How can I set the text property for each button in a radiobutton list? Is there a property that I can set in code?
1
2336
by: rn5a | last post by:
A ASPX page has a RadioButtonList with 2 ListItems - 'Yes' & 'No' <form runat="server"> <asp:RadioButtonList ID="rdlAdd" OnSelectedIndexChanged="ShowHide" AutoPostBack="true" runat="server">...
6
18399
by: Kevin Blount | last post by:
Here's the C# code I'm trying to add: <% listitem1.Text = commIndexText.ToString(); listitem2.Text = commIndexText.ToString(); listitem3.Text = commIndexText.ToString(); %>...
0
1393
by: K B | last post by:
Hi, I would like to show an image in the text position of radiobuttonlist listitems. Not from a dataset, just set in the html or code behind. Example (x = radio button) x Red light image...
1
12291
by: staeri | last post by:
I have a RadioButtonList like this: <asp:RadioButtonList ID="lstReportType" runat="server"> <asp:ListItem Selected="True" Value="CompanyCheck">Text 1</asp:ListItem> <asp:ListItem...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7417
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.