S
simonZ
When I publish my web site and open the page I get the following error:
[NullReferenceException: Object reference not set to an instance of an
object.]
izpisTV.OnInit(EventArgs e) +84
System.Web.UI.Control.InitRecursive(Control namingContainer) +316
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +694
The error is happening in this method:
override protected void OnInit(EventArgs e)
{
imgC = new ImageButton();
imgC.ImageUrl = "./images/imgC.gif";
if ((Boolean)Application["language"] == true)
{
imgC.Visible = true;
}
else
{
imgC.Visible = false;
}
imgC.CausesValidation = false;
imgC.Click += new ImageClickEventHandler(this.imgC_Click);
ContentPlaceHolder cntPH;
cntPH = (ContentPlaceHolder)Master.FindControl("cntC");
cntPH.Controls.Add(imgC);
base.OnInit(e);
}
In developmnet version everything works perfect. The error is only on
published web site.
What could it be?
Regards,Simon
[NullReferenceException: Object reference not set to an instance of an
object.]
izpisTV.OnInit(EventArgs e) +84
System.Web.UI.Control.InitRecursive(Control namingContainer) +316
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +694
The error is happening in this method:
override protected void OnInit(EventArgs e)
{
imgC = new ImageButton();
imgC.ImageUrl = "./images/imgC.gif";
if ((Boolean)Application["language"] == true)
{
imgC.Visible = true;
}
else
{
imgC.Visible = false;
}
imgC.CausesValidation = false;
imgC.Click += new ImageClickEventHandler(this.imgC_Click);
ContentPlaceHolder cntPH;
cntPH = (ContentPlaceHolder)Master.FindControl("cntC");
cntPH.Controls.Add(imgC);
base.OnInit(e);
}
In developmnet version everything works perfect. The error is only on
published web site.
What could it be?
Regards,Simon