InvalidCastException error when viewing or adding data to the events calendar.

Last post 07-02-2008 10:34 PM by Jeev. 1 replies.

Sort Posts:

  • InvalidCastException error when viewing or adding data to the events calendar.

    07-02-2008, 6:38 PM
    • Loading...
    • cdanna4
    • Joined on 07-02-2008, 10:21 PM
    • Posts 1

    When ever i go to add or view things in the clubsite event calendar i get the following:

    System.InvalidCastException was unhandled by user code
      Message="Unable to cast object of type 'System.DBNull' to type 'System.String'."
      Source="App_Web_fkz-yrfu"
      StackTrace:
           at ASP.events_list_aspx.__DataBinding__control15(Object sender, EventArgs e) in h:\LANCERS\ClubWebSite1\Events_List.aspx:line 130
           at System.Web.UI.Control.OnDataBinding(EventArgs e)
           at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
           at System.Web.UI.Control.DataBind()
           at System.Web.UI.Control.DataBindChildren()
      InnerException:

    Could someone offer me a hand with this.  i really don't know what's going on.

  • Re: InvalidCastException error when viewing or adding data to the events calendar.

    07-02-2008, 10:34 PM
    • Loading...
    • Jeev
    • Joined on 11-24-2005, 7:49 AM
    • Posts 3,112

     Looks like you are retrieving  a value from the database that happens to be null and are trying to cast it to string. See line 130 in your code / post the code so that we can take a look at it

    Jeev
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If you get the answer to your question, please mark it as the answer.
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter