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 25:         pdf = (pdf == null ? "" : pdf);
Line 26:         divPDF.InnerHtml = string.Format("<iframe src=\"{0}\" width=\"100%\" height=\"700px\" frameborder=\"0\" scrolling=\"auto\"></iframe>", pdf);
Line 27:         string referer = Request.UrlReferrer.ToString();
Line 28:         if (string.IsNullOrEmpty(referer))
Line 29:         {

Source File: e:\web\eastcorn\usercontrols\pdfViewer.ascx.cs    Line: 27

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   usercontrols_pdfViewer.LoadPDF(String pdf) in e:\web\eastcorn\usercontrols\pdfViewer.ascx.cs:27
   usercontrols_pdfViewer.set_PDF(String value) in e:\web\eastcorn\usercontrols\pdfViewer.ascx.cs:19
   ASP.masterpages_listcontentpagewithmenu_master.Page_Load() in e:\web\eastcorn\masterpages\ListContentPageWithMenu.master:22
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +9850746
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   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.4676.0