473,499 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RadioButtonList Control

Hi,

If I have a radiobuttonlist control and have some items in them, is it
possible to hide one item depending on "situation" for eg: Users, Managers
log in and see the same radiobuttonlist control but if user logs in he
should not see item "Query 5" and if manager logs in he should
<asp:radiobuttonlist id="TaskRadioButton" runat="server" Width="440px"
Font-Size="X-Small" RepeatDirection="Vertical" RepeatColumns="2">
<asp:ListItem Value="Query1" Selected="True">Query
1</asp:ListItem>
<asp:ListItem Value="Query2">Query 2</asp:ListItem>
<asp:ListItem Value="Query3">Query 3</asp:ListItem>
<asp:ListItem Value="Query4">Query 4</asp:ListItem>
<asp:ListItem Value="Query5">Query 5</asp:ListItem>
</asp:radiobuttonlist>

I want to display the list Item "Query 5" only if a manager logs in... which
I check ofcourse..

How do i do it?

Thanks,
Stephen
Nov 19 '05 #1
1 2289
I suggest managing the list using vb.net (codebehind) by adding the list
items at runtime. When you get to the item you wish to hide, only add it if
the user is a manager.

Good luck!
Curt
"Stephen Noronha" <st********@hotmail.com> wrote in message
news:O6**************@tk2msftngp13.phx.gbl...
Hi,

If I have a radiobuttonlist control and have some items in them, is it
possible to hide one item depending on "situation" for eg: Users, Managers
log in and see the same radiobuttonlist control but if user logs in he
should not see item "Query 5" and if manager logs in he should
<asp:radiobuttonlist id="TaskRadioButton" runat="server" Width="440px"
Font-Size="X-Small" RepeatDirection="Vertical" RepeatColumns="2">
<asp:ListItem Value="Query1" Selected="True">Query
1</asp:ListItem>
<asp:ListItem Value="Query2">Query 2</asp:ListItem>
<asp:ListItem Value="Query3">Query 3</asp:ListItem>
<asp:ListItem Value="Query4">Query 4</asp:ListItem>
<asp:ListItem Value="Query5">Query 5</asp:ListItem>
</asp:radiobuttonlist>

I want to display the list Item "Query 5" only if a manager logs in...
which
I check ofcourse..

How do i do it?

Thanks,
Stephen

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8506
by: Mike S | last post by:
I am trying to use a RadioButtonList bound to a custom datasource to acomplish some user functionality. I want to add various onmouseover/onmouseout/onblur/onfocus events to each individual...
6
7702
by: DotNetGruven | last post by:
I have a webform that has a DataGrid on it with a RadioButtonList in each row. It is a simple On & Off. When the User Clicks on either of the RadioButtons, I need to postback to the server and...
4
9639
by: Emil | last post by:
Can somebody tell me what would be the syntax for having an if statement and setting the selected index of a radiobuttonlist? This is my first project using ASP.net and I use C#. I have a repeater...
5
6972
by: Øyvind Isaksen | last post by:
I'm making a page to update articles. When a radiobuttonlist is displayed, I want the stored value to be displayed as default (checked). Example: I use a procedure to display the...
2
4718
by: Michael Bohman | last post by:
Hi, i have a small problem with assigning a database value to a RadioButtonList control. On my form i have 3 user admin=1, premium=2 and basic=3, theese values is stored in an access database in a...
0
2027
by: Sudheer Aalla | last post by:
Hi, When I try to reference the radiobuttonlist control in edititemtemplate in ItemDataBound event of datalist control I am getting NULL reference. I am trying to pre select the yes/no button...
5
2679
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hallo, I have a radiobuttonlist control that is added on a custom Web User Control. This control has a property that exposes the SelectedIndex property of the embedded radiobuttonlist. When...
0
1415
by: =?Utf-8?B?QW5keSBpbiBTb3V0aCBKZXJzZXk=?= | last post by:
I want to use a RadioButtonList Control(HTML) in a GridView control. I can see the RadioButtonList control with each row in the GridView with the code: <asp:GridView ID="GridView1"...
6
2626
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
13
10694
by: tommymo | last post by:
Hi everyone I'm new to this site and the world of ASP.Net C# programming. I have been learning controls and integrating them with a SQL database. So far I have been able to move along and understand...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7012
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
7180
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,...
1
6901
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...
0
5479
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4605
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
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
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 ...
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.