Hi
i have created a custom control that has a
label and Textbox
i dont face any problem when dynamically adding custom control to page but when i try to access sub controls i get NullPointException.
Controls_TextOptionList is my custom control
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TextOptionList.ascx.cs" Inherits="Controls_TextOptionList" %>
<div>
<div >
<div >
<asp:TextBox ID="txtInput" runat="server" ></asp:TextBox></div>
</div>
<div >
<div >
<asp:Label ID="lblOptionList" runat="server" Text="Default Text"></asp:Label></div>
</div>
</div>
Controls_TextOptionList tbList = new Controls_TextOptionList();
Label lbl = ((Label)t ...
Go to the complete details ...