Server Error in '/' Application.

Object reference not set to an instance of an object.

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: Object reference not set to an instance of an object.

Source Error:


Line 19: 
Line 20:         HtmlAnchor anchorNews = (HtmlAnchor)this.Master.FindControl("anchorNews");
Line 21:         anchorNews.Attributes.Add("class", "activelink");
Line 22:     }
Line 23:     PagedDataSource pds = new PagedDataSource();

Source File: c:\inetpub\vhosts\arrahman.com\httpdocs\news.aspx.cs    Line: 21

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   news.Page_Init(Object sender, EventArgs e) in c:\inetpub\vhosts\arrahman.com\httpdocs\news.aspx.cs:21
   System.Web.UI.Control.OnInit(EventArgs e) +102
   System.Web.UI.Page.OnInit(EventArgs e) +15
   System.Web.UI.Control.InitRecursive(Control namingContainer) +165
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1611


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2053.0