c# - RadioButtonList alignment issue -


i have below code based on value backend have display radiobuttonlist listitem value , controls in aspx page.

when rbl1.selectedvalue = "0" alignmnet of controls fine. when rbl1.selectedvalue = "1" radiobuttonlist coming center below, , want rbl align left side only.

can body me in this.

  • c#:

    public string hiddenclassname { get; private set; } if (!string.isnullorempty(value) && value.tolower() == "y") {     rbl1.selectedvalue = "0"; //yes                      lblname.visible = true;     txtname.visible = true;                    hiddenclassname = "display:block"; } else {     rbl1.selectedvalue = "1"; //no     lblname.visible = false;     txtname.visible = false;     hiddenclassname = "display:none"; } 
  • aspx:

        <h2>          information</h2>     <table width="100%">         <tr>             <td>                 <asp:label id="lbl1" runat="server" width="180px" text="would use?"></asp:label>             </td>             <td >                 <asp:radiobuttonlist id="rbl1" runat="server" textalign="right" repeatdirection="horizontal">                     <asp:listitem value="yes" text="yes" selected="true" />                     <asp:listitem value="no" text="no" />                 </asp:radiobuttonlist>             </td>             <td style="padding-bottom: 17px">                     <%=this.showhelp("rbl_help")%>                 </td>           <%--  <asp:panel id="pnlagntname" runat="server">  --%>                                       <td align="right">                     <asp:label id="lblname" text="name" runat="server"></asp:label>                 </td>                 <td align="left">                     <asp:textbox id="txtname" runat="server"></asp:textbox>                 </td>                 <td  style="<%= hiddenclassname %>;padding-bottom: 17px">                     <%=this.showhelp("name_help")%>                 </td>             <%--</asp:panel>--%>         </tr>                    </table>     <div class="hr">     </div> </fieldset> 

add width in each td style="width: 25px"


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -