P
pargat.singh
HI Everyone:
I have a asp.net page with all the controls as below and i need to
access all these on_load because i need to set their values from
database.
Some how i can not access the controls under UpdatePanel. Is there any
generic way to access all the controls from the page no matter if they
are under other controls like under panel etc.
Please help.
Gill
<form id="frmPaymentCalculator" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table border="0" width="700px">
<tr>
<td style="width: 700px">
<aspanel ID="generic"
runat="server">
<asp:Label
ID="rifpaymentCalculator" runat="server" CssClass="PageTitle"></
asp:Label><br />
<br />
<asp:ValidationSummary ID="valSum"
runat="server" HeaderText="" DisplayMode="SingleParagraph" />
</aspanel>
<aspanel ID="pnl1" runat="server"
Width="700px">
<asp:Label CssClass="PageHint"
ID="rifpaymentCalculatorDesc" runat="server"></asp:Label>
<br />
<br />
<asp:Label ID="rrif"
runat="server" CssClass="Bold Hint"></asp:Label>
<asp:Label ID="rrifDash"
runat="server" Text=" - "></asp:Label>
<asp:Label ID="rrifDesc"
runat="server" CssClass="PageHint"></asp:Label><br />
<asp:Label ID="rrifDesc2"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Label ID="lif" runat="server"
CssClass="Bold Hint"></asp:Label>
<asp:Label ID="lifDash"
runat="server" Text=" - "></asp:Label>
<asp:Label ID="lifDesc"
runat="server" CssClass="PageHint"></asp:Label><br />
<asp:Label ID="lifDesc2"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Label ID="lrif"
runat="server" CssClass="Bold Hint"></asp:Label>
<asp:Label ID="lrifDash"
runat="server" Text=" - "></asp:Label>
<asp:Label ID="lrifDesc"
runat="server" CssClass="PageHint"></asp:Label><br />
<asp:Label ID="lrifDesc2"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Label ID="prif"
runat="server" CssClass="Bold Hint"></asp:Label>
<asp:Label ID="prifDash"
runat="server" Text=" - "></asp:Label>
<asp:Label ID="prifDesc"
runat="server" CssClass="PageHint"></asp:Label><br />
<asp:Label ID="prifDesc2"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Label ID="disclaimer"
runat="server" CssClass="Bold Hint"></asp:Label>
<asp:Label ID="disclaimerDesc"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Button ID="btnNext"
runat="server" CssClass="BUTTON" Width="83px" OnClick="btnNext_Click" /
<br />
</td>
</tr>
<tr>
<td style="width: 700px">
<aspanel ID="pnl2" Visible="false"
runat="server" Height="550px" Width="700px">
<fieldset>
<table border="0"
width="100%">
<tr>
<td style="width:
50%">
<asp:Label
CssClass="LabelFont" ID="lblEmpProvince" Width="100%" runat="server"></
asp:Label></td>
<td style="width: 50%"
align="right">
<aspropDownList
Width="70%" ID="lstEmpProvince" runat="server" AutoPostBack="True">
</
aspropDownList>
</td>
</tr>
<tr>
<td style="width:
50%">
<asp:Label
Width="100%" ID="lblCountryofResidenceAtRetirem" runat="server"
CssClass="LabelFont"></asp:Label>
</td>
<td style="width: 50%"
align="right">
<aspropDownList
Width="70%" ID="lstRetCountry" AutoPostBack="true" runat="server">
</
aspropDownList>
</td>
</tr>
<tr>
<td style="width:
50%">
<asp:Label
Width="100%" ID="lblProvinceOfResidenceAtRetire" runat="server"
CssClass="LabelFont"></asp:Label>
</td>
<td style="width: 50%"
align="right">
<aspropDownList
Width="70%" ID="lstRetProvince" runat="server">
</
aspropDownList>
</td>
</tr>
</table>
</fieldset>
<br />
<asp:Label ID="lblDatesHint"
runat="server"></asp:Label>
</aspanel>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
I have a asp.net page with all the controls as below and i need to
access all these on_load because i need to set their values from
database.
Some how i can not access the controls under UpdatePanel. Is there any
generic way to access all the controls from the page no matter if they
are under other controls like under panel etc.
Please help.
Gill
<form id="frmPaymentCalculator" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table border="0" width="700px">
<tr>
<td style="width: 700px">
<aspanel ID="generic"
runat="server">
<asp:Label
ID="rifpaymentCalculator" runat="server" CssClass="PageTitle"></
asp:Label><br />
<br />
<asp:ValidationSummary ID="valSum"
runat="server" HeaderText="" DisplayMode="SingleParagraph" />
</aspanel>
<aspanel ID="pnl1" runat="server"
Width="700px">
<asp:Label CssClass="PageHint"
ID="rifpaymentCalculatorDesc" runat="server"></asp:Label>
<br />
<br />
<asp:Label ID="rrif"
runat="server" CssClass="Bold Hint"></asp:Label>
<asp:Label ID="rrifDash"
runat="server" Text=" - "></asp:Label>
<asp:Label ID="rrifDesc"
runat="server" CssClass="PageHint"></asp:Label><br />
<asp:Label ID="rrifDesc2"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Label ID="lif" runat="server"
CssClass="Bold Hint"></asp:Label>
<asp:Label ID="lifDash"
runat="server" Text=" - "></asp:Label>
<asp:Label ID="lifDesc"
runat="server" CssClass="PageHint"></asp:Label><br />
<asp:Label ID="lifDesc2"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Label ID="lrif"
runat="server" CssClass="Bold Hint"></asp:Label>
<asp:Label ID="lrifDash"
runat="server" Text=" - "></asp:Label>
<asp:Label ID="lrifDesc"
runat="server" CssClass="PageHint"></asp:Label><br />
<asp:Label ID="lrifDesc2"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Label ID="prif"
runat="server" CssClass="Bold Hint"></asp:Label>
<asp:Label ID="prifDash"
runat="server" Text=" - "></asp:Label>
<asp:Label ID="prifDesc"
runat="server" CssClass="PageHint"></asp:Label><br />
<asp:Label ID="prifDesc2"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Label ID="disclaimer"
runat="server" CssClass="Bold Hint"></asp:Label>
<asp:Label ID="disclaimerDesc"
runat="server" CssClass="PageHint"></asp:Label>
<br />
<br />
<asp:Button ID="btnNext"
runat="server" CssClass="BUTTON" Width="83px" OnClick="btnNext_Click" /
</aspanel><br />
<br />
</td>
</tr>
<tr>
<td style="width: 700px">
<aspanel ID="pnl2" Visible="false"
runat="server" Height="550px" Width="700px">
<fieldset>
<table border="0"
width="100%">
<tr>
<td style="width:
50%">
<asp:Label
CssClass="LabelFont" ID="lblEmpProvince" Width="100%" runat="server"></
asp:Label></td>
<td style="width: 50%"
align="right">
<aspropDownList
Width="70%" ID="lstEmpProvince" runat="server" AutoPostBack="True">
</
aspropDownList>
</td>
</tr>
<tr>
<td style="width:
50%">
<asp:Label
Width="100%" ID="lblCountryofResidenceAtRetirem" runat="server"
CssClass="LabelFont"></asp:Label>
</td>
<td style="width: 50%"
align="right">
<aspropDownList
Width="70%" ID="lstRetCountry" AutoPostBack="true" runat="server">
</
aspropDownList>
</td>
</tr>
<tr>
<td style="width:
50%">
<asp:Label
Width="100%" ID="lblProvinceOfResidenceAtRetire" runat="server"
CssClass="LabelFont"></asp:Label>
</td>
<td style="width: 50%"
align="right">
<aspropDownList
Width="70%" ID="lstRetProvince" runat="server">
</
aspropDownList>
</td>
</tr>
</table>
</fieldset>
<br />
<asp:Label ID="lblDatesHint"
runat="server"></asp:Label>
</aspanel>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>