Note that there are some explanatory texts on larger screens.

plurals
  1. POMaking Checkboxlist invisible
    primarykey
    data
    text
    <p>I have a checkboxlist in ASP.net with several choices in it. Is there a way that I can make the physical check able box invisible? I want it so that only the item in question is visible, but the box is invisible. If this is not possible can somebody recommend an alternate ASP control that would behave similarly to the checkboxlist?</p> <p>For example I have a checkboxlist such as this:</p> <pre><code>&lt;asp:CheckBoxList ID="Example" runat="server" AutoPostBack="false" RepeatColumns="2" RepeatDirection="Horizontal"&gt; &lt;asp:ListItem&gt; 1 &lt;/asp:ListItem&gt; &lt;asp:ListItem&gt; 2 &lt;/asp:ListItem&gt; &lt;asp:ListItem&gt; 3 &lt;/asp:ListItem&gt; &lt;asp:ListItem&gt; 4 &lt;/asp:ListItem&gt; &lt;asp:ListItem&gt; 5 &lt;/asp:ListItem&gt; &lt;/asp:CheckBoxList&gt; </code></pre> <p>Now I want only the number to be visible and selectable, but I want to the checkbox to be invisible. Much like the way a button works but I feel as though creating x amount of buttons may be more tedious.</p> <p>As per the answer I have tried the demo Jquery and came out with this:</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Testjq.Test" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;script type = "text/javascript" src ="Scripts/jquery-1.7.1.min.js"&gt;&lt;/script&gt; &lt;script type = "text/javascript" src ="Scripts/jquery-ui-1.8.18.custom.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(function () { $("#check").button(); $("#format").buttonset(); }); &lt;/script&gt; &lt;style&gt; #format { margin-top: 2em; } &lt;/style&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="demo"&gt; &lt;input type="checkbox" id="check" /&gt;&lt;label for="check"&gt;Toggle&lt;/label&gt; &lt;div id="format"&gt; &lt;input type="checkbox" id="check1" /&gt;&lt;label for="check1"&gt;B&lt;/label&gt; &lt;input type="checkbox" id="check2" /&gt;&lt;label for="check2"&gt;I&lt;/label&gt; &lt;input type="checkbox" id="check3" /&gt;&lt;label for="check3"&gt;U&lt;/label&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- End demo --&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Unfortunatley I still cannot get it to work. Any additional help would be much appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload