Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
375
Access to user control inside WebExplorerBar not working
posted

Hi guys,

I Have WebExplorerBar and inside I have ItemTemplate and inside ItemTemplate I have usercontrol.In code behind I try to access to it bu unsuccesfull.

<ig:WebExplorerBar ID="WebExplorerBar1" runat="server" CssClass="viewPanel" StyleSetName="Header" Width="805px" Height="870px">

<%--<igmisc:WebPanel ID="ViewPanel" runat="server" CssClass="viewPanel" StyleSetName="Header"
Width="805px" Height="870px">--%>
<%--<ClientSideEvents ExpandedStateChanging="CancelXpand" />--%>

<ItemTemplate>


<div class="content" id="content">
<div id="navigation" class="navigation" style="height: 5px;">
</div>
<div id="findemp" class="findemp" style="margin-top: 0px">
<div id="personInfo" style="margin-top: 0px">
<table>
<tr>
<td>
<uc1:CFNList ID="CFNList1" runat="server"></uc1:CFNList>
</td>

Here is my coding in C#:

UserControl cntrl = (UserControl)this.WebExplorerBar1.Groups[0].FindControl("CFNList1").Controls[0];

and when I am running I am getting runtime error:

it is pointing to Groups[0] and say:Index was out of range.

Please help.

Thanks,