Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > RadioButtonList Control

Reply
Thread Tools

RadioButtonList Control

 
 
Stephen Noronha
Guest
Posts: n/a
 
      08-25-2005
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


 
Reply With Quote
 
 
 
 
Curt
Guest
Posts: n/a
 
      08-25-2005
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" <> wrote in message
news:...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radiobuttonlist (a custom control) selectedindexchanged event notfiring in User Control Martin Frank ASP .Net Web Controls 3 11-01-2006 02:29 PM
Handling Radiobuttonlist event inside Repeater Control Ravi ASP .Net 2 08-18-2006 06:56 AM
Using a RadioButtonList Server Control in a Composite Control Greg Larden ASP .Net Building Controls 1 07-31-2006 11:04 PM
adding radiobuttonlist within a datalist control ani ASP .Net 0 11-07-2003 02:46 PM
adding radiobuttonlist within a datalist control ani ASP .Net 0 11-06-2003 11:01 PM



Advertisments