My problem is when I want to use UserControl with a parameter.
it calls both constructors (constructor without parameter And constroctor with parameters)
Is this a normal situation?
If not, how do I build an object.
public partial class FreeExperience : Arche.Web.UI.UserControlBase
{
private ItemInfo itemInfo;
public FreeExperience() : base()
{
}
public FreeExperience(ItemInfo itemInfo) : this()
{
this.itemInfo = itemInfo;
}
here I made a simple userControl,
and name it on another page.
<%@ Register TagPrefix="uc" TagName="FreeExperience" Src="include/FreeExperience.ascx" %>
...
<uc:FreeExperience ID="ucFreeExperience" runat="server"/>
And in the function of Page_loadthis CS web page
ucFreeExperience = new Arche.Itempage3.include.FreeExperience(itemInfo);
source
share