Saturday, 15 March 2014

c# - RadioButtonList alignment issue -


I have code below the backend based on value, I have to display the radibutonist listit value and display control in the aspx page. / P>

When the alignmnet of rbl1.SelectedValue = "0" control is fine. When the rbl1.SelectedValue = "1" radio button list is coming in the center like below, and I want this RLL just align left side.

Any body can help me in this.

  • C #:

    Public String HiddenClassName {get; Private set; } If (string! Isnalarctic (value) and value toololver () == "y") {rlb 1. Selected value = "0"; // yes lblName.Visible = true; TxtName.Visible = true; HiddenClassName = "Display: Block"; } And {rbl1. Selected value = "1"; // no lblName.Visible = false; TxtName.Visible = false; HiddenClassName = "Display: None"; }
  • ASPX:

      & lt; H2 & gt; Notification & lt; / H2 & gt; & Lt; Table width = "100%" & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Asp: label id = "lbl1" runat = "server" width = "180px" text = "do you want to use?" & Gt; & Lt; / Asp: Label & gt; & Lt; / TD & gt; & Lt; Td> & Lt; ASP: Radiobutton list id = "RLB1" runat = "server" textlines = "right" duplication direction = "horizontal" & gt; & Lt; Asp: ListItem value = "yes" text = "yes" selected = "true" /> & Lt; Asp: ListItem value = "no" text = "no" /> & Lt; / ASP: RadioButtonList & gt; & Lt; / TD & gt; & Lt; Td style = "padding-bottom: 17px" & gt; & Lt;% = this.ShowHelp ("rbl_help")%> & Lt; / TD & gt; & Lt;% - & lt; Asp: panel id = "pnlAgntName" runat = "server" & gt; -% & gt; & Lt; Td align = "right" & gt; & Lt; Asp: label id = "lbl name" text = "name" runat = "server" & gt; & Lt; / Asp: label & gt; & Lt; / TD & gt; & Lt; Td align = "left" & gt; & Lt; ASP: Text Box ID = "Test Name" Run = "Server" & gt; & Lt; / Asp: text box & gt; & Lt; / TD & gt; & Lt; Td style = "& lt;% = HiddenClassName%>; padding-down: 17px" & gt; & Lt;% = this.ShowHelp ("Name_Help")% & gt; & Lt; / TD & gt; & Lt;% - & lt; / ASP: Cell & gt; -% & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; Div class = "hr" & gt; & Lt; / Div & gt; & Lt; / Fieldset & gt; Style = "Add width to each TD" = 


No comments:

Post a Comment