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 456:                M += "                                 <img src=""" & Context.Items("domainName") & "admin/" & objReaderb("SmallImage").ToString() & """ alt=""" & objReaderb("Name").ToString() & """>"
Line 457:                'M += "                                       <a href=""" & Context.Items("domainName") & "profile/" & objReaderb("MasterID").ToString() & "/" & Utility.EncodeTitle(objReaderb("Name").ToString().ToLower(), "-") & """ class=""viewprof"" title=""" & objReaderb("Name").ToString() & """>View Profile</a>"
Line 458:                If (String.IsNullOrWhiteSpace(objReaderb("url"))) Then
Line 459:                    M += "                                       <a href=""" & Context.Items("domainName") & "profile/" & objReaderb("MasterID").ToString() & "/" & Utility.EncodeTitle(objReaderb("Name").ToString().ToLower(), "-") & """ class=""viewprof"" title=""" & objReaderb("Name").ToString() & """>View Profile</a>"
Line 460:                Else

Source File: D:\InetPub\vhosts\jamesberrylaw.com\httpdocs\SectorDetails.aspx.vb    Line: 458

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +1307492
   SectorDetails.GetTeam() in D:\InetPub\vhosts\jamesberrylaw.com\httpdocs\SectorDetails.aspx.vb:458
   SectorDetails.Page_Load(Object sender, EventArgs e) in D:\InetPub\vhosts\jamesberrylaw.com\httpdocs\SectorDetails.aspx.vb:24
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   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