Hi,
I have created some dynamic controls in page load and added to an existing asp:Table
Its displaying in the page ( the page contains 3 tabs , this controls are added in one of the tab)
If I click on another tab , I am trying to save the data in this dynamic controls .
But not able to access it.
CODE
This panel is a part of one table.
<asp:Panel ID="pStudySpecific" runat="server" EnableViewState="true" >
<%--<table width="100%" > --%>
<tr>
<td>
<asp:Table width="100%" border="1" runat="server" id="tblTimeZone" enableviewstate="true" >
<asp:TableRow>
<asp:TableCell>
<asp:Table ID="tblTimeZones" runat="server" border="0" EnableViewState="true" >
<asp:TableHeaderRow HorizontalAlign="Left">
<asp:TableHeaderCell HorizontalAlign="Left">
<asp:Label runat="server" ID="lblTimeZoneDetails" Text="TimeZone" SkinID="GroupTitleSkin"></asp:Label>
</asp:TableHeaderCell>
</asp:TableHeaderRow>
</asp:Table>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</td>
</tr>
</panel>
1. page load create controls and added to tblTimeZones.
2.Tab( link button click event)
I tried to access control
ContentPlaceHolder cphDetails = (ContentPlaceHolder)this.Master.FindControl("cphDetails");
Table tblTimeZon = (Table)cphDetails.FindControl("tblTimeZones");
till here its fine ,I am getting the values.
DropDownList drpLstControl = (DropDownList)tblTimeZon.FindControl("drpLst" + objCustomField.DatabaseField);
In the above line its giving null value.
This all controls are in an update panel and content place holder.
Please help.