radio button - reserving a place for a radiobutton created dynamically in asp.net? -
i creating radiobuttons positioned horizontally, showing , not showing others depending on condition
if set visible false, place occupied next radio button, there way of put space instead?
basic creation of radiobutton: (test code)
dim rdbutton new radiobutton rdbutton.text = "test" rdbutton.groupname = "test2" cell.controls.add(rdbutton) dim rdbutton2 new radiobutton rdbutton2.text = "test2" rdbutton2.groupname = "test2" rdbutton2.visible=false cell.controls.add(rdbutton2) dim rdbutton3 new radiobutton rdbutton3.text = "test" rdbutton3.groupname = "test2" cell.controls.add(rdbutton3)
thanks
you use css class hide radio button. achieve can similar this:
css:
.radio-spacer { visibility: hidden; }
asp.net controls:
<asp:radiobutton id="radiobutton1" text="blue" groupname="hats" runat="server" /> <asp:radiobutton cssclass="radio-spacer" id="radiobutton2" text="purple" groupname="hats" runat="server" /> <asp:radiobutton id="radiobutton3" text="orange" groupname="hats" runat="server" />
or alternative (just html):
<label> <input type="radio" name="hatcolour" value="blue" id="hatcolour_0" /> blue</label> <label class="radio-spacer"> <input type="radio" name="hatcolour" value="purple" id="hatcolour_0" /> purple</label> <label> <input type="radio" name="hatcolour" value="orange" id="hatcolour_1" /> orange</label>
in above example see 2 radio buttons (blue , orange) , see spacer purple should be. can test here.
Comments
Post a Comment