Server Error in '/' Application.

Object cannot be cast from DBNull to other types.

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: Object cannot be cast from DBNull to other types.

Source Error:


Line 513: if (dataReader != null) Line 514: dataReader.Close(); Line 515: throw ex; Line 516: } Line 517: finally

Source File: f:\calendar.jo\App_Code\DAL\JTPEvents\JTPEventDAL.cs    Line: 515

Stack Trace:


[InvalidCastException: Object cannot be cast from DBNull to other types.] JTBCalendar.Code.DAL.JTPEvents.JTPEventDAL.LoadJTPEventUser(JTPEventUser jTPEvent) in f:\calendar.jo\App_Code\DAL\JTPEvents\JTPEventDAL.cs:515 JTBCalendar.Code.BL.JTPEvents.JTPEventUser..ctor(Int32 jTPEventId) in f:\calendar.jo\App_Code\BL\JTPEvents\JTPEventUser.cs:409 arabic_EventNew.LoadJTPEvent() in f:\calendar.jo\arabic\EventNew.aspx.cs:174 arabic_EventNew.Page_Load(Object sender, EventArgs e) in f:\calendar.jo\arabic\EventNew.aspx.cs:613 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52 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