N
Nathan Sokalski
I have a UserControl (*.ascx) that has the following design:
<div id="divFileDir" runat="server">
<asp:Image ID="imgIcon" runat="server" CssClass="icon" Height="16px"
Width="16px"/>
<asp:LinkButton ID="lnkName" runat="server" CssClass="filedir"
CausesValidation="false"/>
<asp:Label ID="lblSize" runat="server" CssClass="size"/>
<asp:Label ID="lblDate" runat="server" CssClass="date"/>
</div>
The Set method of some of the properties I have declared in the codebehind
set certain attributes (such as Text). In the overloaded New() method, I
assign certain values to these properties, therefore calling their Set
method. This causes the following error:
Object reference not set to an instance of an object.
The Objects that are not set to an instance of an object are the Controls in
the *.ascx file. What can I do about this to allow me to set the properties
when the UserControl is created? Thanks.
<div id="divFileDir" runat="server">
<asp:Image ID="imgIcon" runat="server" CssClass="icon" Height="16px"
Width="16px"/>
<asp:LinkButton ID="lnkName" runat="server" CssClass="filedir"
CausesValidation="false"/>
<asp:Label ID="lblSize" runat="server" CssClass="size"/>
<asp:Label ID="lblDate" runat="server" CssClass="date"/>
</div>
The Set method of some of the properties I have declared in the codebehind
set certain attributes (such as Text). In the overloaded New() method, I
assign certain values to these properties, therefore calling their Set
method. This causes the following error:
Object reference not set to an instance of an object.
The Objects that are not set to an instance of an object are the Controls in
the *.ascx file. What can I do about this to allow me to set the properties
when the UserControl is created? Thanks.