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 114:        else if (cUrl.IndexOf("Corpootto_occhiali_da_sole/Default.aspx") > 0)
Line 115:        {
Line 116:            ((HtmlGenericControl)this.FindControl("sole")).Attributes.CssStyle.Clear();
Line 117:            ((HtmlGenericControl)this.FindControl("sole")).Attributes.Add("class", "active");
Line 118:        }

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

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:116
   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