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 43:             int item = CurrentPage;
Line 44:             if (item < PageCount) item++;
Line 45:             return string.Format("{0}{2}page={1}", TargetUrl, item.ToString(), TargetUrl.EndsWith("/") ? "" : "/");
Line 46:         }
Line 47:     }

Source File: c:\inetpub\vhosts\pharmaopportunities.com\httpdocs\Controls\PagingControl.ascx.cs    Line: 45

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Controls_PagingControl.get_NextUrl() in c:\inetpub\vhosts\pharmaopportunities.com\httpdocs\Controls\PagingControl.ascx.cs:45
   Controls_PagingControl.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\pharmaopportunities.com\httpdocs\Controls\PagingControl.ascx.cs:106
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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