Server Error in '/' Application.

Operator '=' is not defined for type 'DBNull' and string "Other".

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: Operator '=' is not defined for type 'DBNull' and string "Other".

Source Error:


Line 445:  </p>
Line 446:<div class="gost"><b>Uploaded</b> - <%=Day(upload_date)&"/"&Month(upload_date)&"/"&Year(upload_date)%></div><div class="gost"><b>Views </b> <%=view_count%></div><div class="clearfix"></div>
Line 447:<%if city_name="Other" then
Line 448:else
Line 449:%>

Source File: D:\website\photo\app\photo.aspx    Line: 447

Stack Trace:


[InvalidCastException: Operator '=' is not defined for type 'DBNull' and string "Other".]
   Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(Object Left, Object Right, Boolean TextCompare) +1279184
   ASP.app_photo_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\website\photo\app\photo.aspx:447
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
   System.Web.UI.Page.Render(HtmlTextWriter writer) +30
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1342


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