Server Error in '/' Application.

Conversion from type 'DBNull' to type 'String' is not valid.

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.InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.

Source Error:


Line 92: 			
Line 93: 			AddressStr = Server.UrlEncode(row("Office_Google_Address"))
Line 94: 			AvgLat = row("AVG_Latitude")
Line 95: 			AvgLon = row("AVG_Longitude")
Line 96: 		Next		

Source File: D:\inetpub\Websites\Shared\info\MapWithOfficeMarkersByOffice.ascx.vb    Line: 94

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +1033
   Info_MapWithOfficeMarkersByOffice.LoadOfficeEMBED() in D:\inetpub\Websites\Shared\info\MapWithOfficeMarkersByOffice.ascx.vb:94
   Info_MapWithOfficeMarkersByOffice.set_OfficeID(Int32 value) in D:\inetpub\Websites\Shared\info\MapWithOfficeMarkersByOffice.ascx.vb:30
   Info_EyeMaps.DropDownList2_DataBound(Object sender, EventArgs e) in D:\inetpub\Websites\Shared\info\EyeMaps.ascx.vb:116
   System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +126
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +134
   System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +36
   System.Web.UI.Control.PreRenderRecursiveInternal() +200
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7479


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