views:

414

answers:

3

basically, i just want the RadioButtonList without the radio button on it, i will code the rbl so that selected items have a different background color and make it look more professional, the radio buttons themselves i want to be able to get rid of in terms of apperance... if you know of any way to do it, please do let me know!

+1  A: 

I can't think of any straightforward method without mixing some tricks with javascript.

This could be something you want:
Accessible, Custom Designed Checkbox and Radio Button Inputs Styled with CSS (and a dash of jQuery)

The stand-a-lone demo here.

The image used to mimick the radio buttons: Radio Button Image

o.k.w
thanks but this doesn't get rid of the hollow circle to the left of the radio button
Erx_VB.NExT.Coder
But those are images. See my updated answer. You can create your own hollow-less circles.
o.k.w
i see what you're saying, thanks, will use this as a last resort, still looking for a lovely style="button: dissapear.and.dont.come.back" type css style :)
Erx_VB.NExT.Coder
+2  A: 

this helped me a lot:

http://www.ryanfait.com/resources/custom-checkboxes-and-radio-buttons/

tillinberlin
thanks, this doesn't get rid of the hollow circle to the left of the radio button, however it is still a great resource and i have bookmarked it, will upvote you.
Erx_VB.NExT.Coder
+1  A: 

found a plausible solution...

    <head runat="server">
    <title>Test - Hide radio circles from radiobuttonlist</title>
    <script type="text/javascript">
    function hideRadioSymbol()
    {
        var rads = new Array();
        rads = document.getElementsByName('list1'); //Whatever ID u have given to ur radiolist.
        for(var i = 0; i < rads.length; i++)
            document.getElementById(rads.item(i).id).style.display = 'none'; //hide
    }
    </script>
    </head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:RadioButtonList ID="list1" runat="server">
            <asp:ListItem Value="item1" Text="item1"></asp:ListItem>
            <asp:ListItem Value="item2" Text="item2"></asp:ListItem>
        </asp:RadioButtonList>
    </div>
    <script type="text/javascript">hideRadioSymbol()</script> //After list is completely rendered/loaded.
    </form>
</body>
</html>

oh and btw, mvc is awesome, it's how asp.net should have been from the begining!!

Erx_VB.NExT.Coder
as usual, stackoverflow just removed all of the html, not bad default logic for a code posting site!
Erx_VB.NExT.Coder
Select the `101010` button to indent your code 4 spaces and preserve the formatting.
ChrisF
thanks chris, fixed!
Erx_VB.NExT.Coder