A
Amar
I have a web form with several fields. Depending on user
selection in one combo box, i populate a text box and a
check box in one line. For example if the user selects 2
years, then i show the user two lines with each line
containing 1 text box and 1 check box. I have already put
in 10 lines, using ,<tr> in a table, from which i display
only the required number of <tr> in the code behind
(setting the visible property of controls). Each <tr>
contains a validator for the text box. It works properly,
except that there appears a white space below the 2 <tr>
(if 2 is selected in dropdown). If 10 is selected then all
10 lines <tr> are displayed and no whitespace appears. Any
selection less than 10 leads to the appearance of some
white space below the displayed lines. How do i remove
this white space or make the table dynamic?
<table style="WIDTH: 734px; HEIGHT: 273px" cellSpacing="0"
cellPadding="2" border="0">
<tr>
<td style="WIDTH: 56px; HEIGHT: 23px"><asp:textbox
id="txtNumDaysYr1" Runat="server" Width="59px"
ToolTip="Enter Year 1" Visible="False"></asp:textbox>
</td>
<td style="WIDTH: 38px; HEIGHT: 23px"><asp:CheckBox
id="chkCage1" runat="server" Width="22px" Text='<font
style="VERTICAL-ALIGN: super" face = "tahoma" size = "0.1"
Color = "#800000">1</font>' ToolTip="Cage1"
Visible="False"></asp:CheckBox></td>
<asp:customvalidator id="cvNumDaysYr1" Runat="server"
Display="Dynamic" ControlToValidate="txtNumDaysYr1"
ErrorMessage="* Number of days cannot be zero for Year 1"
OnServerValidate="ServerValidate_NumDaysYr1"></asp:customva
lidator><asp:comparevalidator id="cmvNumDaysYr1"
Runat="Server" Display="Dynamic"
ControlToValidate="txtNumDaysYr1" Type="Double"
ErrorMessage="* Number of days for year 1 must be a
number" Operator="DataTypeCheck"></asp:comparevalidator>
</tr>
</table>
selection in one combo box, i populate a text box and a
check box in one line. For example if the user selects 2
years, then i show the user two lines with each line
containing 1 text box and 1 check box. I have already put
in 10 lines, using ,<tr> in a table, from which i display
only the required number of <tr> in the code behind
(setting the visible property of controls). Each <tr>
contains a validator for the text box. It works properly,
except that there appears a white space below the 2 <tr>
(if 2 is selected in dropdown). If 10 is selected then all
10 lines <tr> are displayed and no whitespace appears. Any
selection less than 10 leads to the appearance of some
white space below the displayed lines. How do i remove
this white space or make the table dynamic?
<table style="WIDTH: 734px; HEIGHT: 273px" cellSpacing="0"
cellPadding="2" border="0">
<tr>
<td style="WIDTH: 56px; HEIGHT: 23px"><asp:textbox
id="txtNumDaysYr1" Runat="server" Width="59px"
ToolTip="Enter Year 1" Visible="False"></asp:textbox>
</td>
<td style="WIDTH: 38px; HEIGHT: 23px"><asp:CheckBox
id="chkCage1" runat="server" Width="22px" Text='<font
style="VERTICAL-ALIGN: super" face = "tahoma" size = "0.1"
Color = "#800000">1</font>' ToolTip="Cage1"
Visible="False"></asp:CheckBox></td>
<asp:customvalidator id="cvNumDaysYr1" Runat="server"
Display="Dynamic" ControlToValidate="txtNumDaysYr1"
ErrorMessage="* Number of days cannot be zero for Year 1"
OnServerValidate="ServerValidate_NumDaysYr1"></asp:customva
lidator><asp:comparevalidator id="cmvNumDaysYr1"
Runat="Server" Display="Dynamic"
ControlToValidate="txtNumDaysYr1" Type="Double"
ErrorMessage="* Number of days for year 1 must be a
number" Operator="DataTypeCheck"></asp:comparevalidator>
</tr>
</table>