Server Error in '/' Application.

Riferimento a un oggetto non impostato su un'istanza di oggetto.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.

Source Error:


Line 99:         else if (cUrl.IndexOf("Punti_vendita/Default.aspx") > 0)
Line 100:        {
Line 101:            ((HtmlGenericControl)this.FindControl("puntivendita")).Attributes.CssStyle.Clear();
Line 102:            ((HtmlGenericControl)this.FindControl("puntivendita")).Attributes.Add("class", "active");
Line 103:        }

Source File: d:\inetpub\wwwroot\Domini\Corpootto.it\www\Master\MasterPage.master.cs    Line: 101

Stack Trace:


[NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.]
   Master_MasterPage.Page_Load(Object sender, EventArgs e) in d:\inetpub\wwwroot\Domini\Corpootto.it\www\Master\MasterPage.master.cs:101
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975