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 58:     {
Line 59:         HyperLink txt = (HyperLink)frmProfile.FindControl("HyperLink1");
Line 60:         string URL = txt.Text.Replace("http://https://", "https://");
Line 61:         txt.Text = URL;
Line 62:         txt.NavigateUrl = URL;

Source File: c:\inetpub\vhosts\readingbusinessdirectory.co.uk\httpdocs\CompanyProfile.aspx.cs    Line: 60

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   CompanyProfile.frmProfile_DataBound(Object sender, EventArgs e) in c:\inetpub\vhosts\readingbusinessdirectory.co.uk\httpdocs\CompanyProfile.aspx.cs:60
   System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +125
   CompanyProfile.Page_PreRender(Object sender, EventArgs e) in c:\inetpub\vhosts\readingbusinessdirectory.co.uk\httpdocs\CompanyProfile.aspx.cs:43
   System.Web.UI.Control.OnPreRender(EventArgs e) +11728867
   System.Web.UI.Control.PreRenderRecursiveInternal() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3670


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