We have a simple asp.net repeater, in one line we have a checkbox, a label Database-id) and not visible (used for postback) and a text (in the tablebell)
Now I want to make it like windows, if you click on the text, the checkbox Should be selected or unselected. / P>
Is there any link or solution in it, maybe already with jQuery?
EDIT: As I said, this is an asp.repeater. And the table is for the layout, so use the checkbox. The property property is not designed to qualify (for example, line wrap) the checkbox ID and text is dynamically added / repeater rendering is changed because the label solution Also does not really work.
Assume that you do not need jQuery and Table - Construct
< Code> & asp: repeat runat = "server" & gt; & Lt; ItemTemplate & gt; & Lt; ASP: checkbox runat = "server" text = "your text" /> & Lt; / ItemTemplate & gt; & Lt; / ASP: Repeater & gt;
This is basically the solutions provided by Recondo Vega that you find in the property text of the checkbox, clickable and check / uncheck the checkbox ...
Edit:
Again, after thinking about this once again, there is another solution:
& asp: repeater runat = "server" & gt; & Lt; HeaderTemplate & gt; & Lt; Table & gt; & Lt; / HeaderTemplate & gt; & Lt; ItemTemplate & gt; & Lt; TR & gt; & Lt; Td> & Lt; Asp: checkbox runat = "server" id = "checkbox" /> gt; & Lt; / Td> & Lt; Td> & Lt; ASP: Label Runat = "Server" Associated ControlID = "Checkbox" & gt; Your text & lt; / Asp: label & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / ItemTemplate & gt; & Lt; FooterTemplate & gt; & Lt; / Table & gt; & Lt; / FooterTemplate & gt; & Lt; / ASP: Repeater & gt;
Notes: You can use the ASP: Label-Element Text-Attribute!
Comments
Post a Comment