Server Error in '/store2' 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 55: <br />
Line 56: <%=parseAuthorLink(r("Author"))%></span> <br />
Line 57: <%=categoryNameLink(r("CategoryID"))%><br />
Line 58: <b>ISBN: <%=r("Code")%></b><br />
Line 59: <% if r("IssueDate") isnot System.DbNull.Value then %>

Source File: D:\WebsiteMK\mk.net\store2\View.aspx    Line: 57

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +1287693
   ASP.index_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\WebsiteMK\mk.net\store2\View.aspx:57
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1303


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