Object cannot be cast from DBNull to other types.

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/17/2013 10:18:32 AM
Gravatar
Total Posts 17

Object cannot be cast from DBNull to other types.

Hello!!

I'm trying to implement a new feature cloned from Event Calendar.

I added a new field date (the end date of event).

In the record before the change with the addition of the new field, the added value in the field is null.

This time in the detail view of the event causing an error like ''Object cannot be cast from DBNull to other types".
If I change the field value manually, the display goes smoothly.

I can not find the way to avoid this problem.
Everything hangs in the line

CalendarEvent calendarEvent = new CalendarEvent(itemId);

in the routine populateControls () into EventDetails.aspx.cs

Can someone help me?

P.S. (I apologize for my English)

You must sign in to post in the forums. This thread is closed to new posts.