.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

how to make item in radiobuttonlist to visible false or true

Posted By:Pravin       Posted Date: May 18, 2012    Points: 40    Category: Visual Studio    URL: http://www.dotnetspark.com  

There is no Visible property for radiobuttonlist.So here you know how we can set visible = 'false and true' to Radiobuttonlist items.

<asp:RadioButtonList ID="rdbMember" runat="server" CellPadding="15" Font-Size="15px" >
<asp:ListItem Value="rdblst1" Text="Free" ></asp:ListItem>
<asp:ListItem Value="rdblst2" Text="Symbol" ></asp:ListItem>
<asp:ListItem Value="rdblst3" Text="QC"></asp:ListItem>
<asp:ListItem Value="rdblst4" Text="Active"></asp:ListItem>
<asp:ListItem Value="rdblst5" Text="Flow"></asp:ListItem>
<asp:ListItem Value="rdblst6" Text="Call"></asp:ListItem>

// Add a Style like below :
<style type="text/css">

//Then set attribute to radiobuttonlist control like this,
//Put the below code in code behind where u need,this will make the control visible to false and true

rdbMember.Items[3].Attributes.Add("class", "hidden");


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend