Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: typecast error!

Reply
Thread Tools

Re: typecast error!

 
 
Joe Van Meer
Guest
Posts: n/a
 
      02-01-2006
seems your system date is off a bit

"Arvind R" <arvind http://www.velocityreviews.com/forums/(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Whats the solution for this?
>
> Specified cast 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: Specified cast is not

valid.
>
> Source Error:
>
> Line 118: if ((dr["session_startdate"].ToString() !=
> DBNull.Value.ToString()))
> Line 119: {
> Line 120: DateTime dtEvent = (DateTime)dr["session_startdate"];
> Line 121:
> Line 122ublic void CalendarDRender(object sender,
> System.Web.UI.WebControls.DayRenderEventArgs e)
>
> {
>
>
> // If the month is CurrentMonth
>
> if (!e.Day.IsOtherMonth )
>
> {
>
> foreach (DataRow dr in ds.Tables[0].Rows)
>
> {
>
> if ((dr["session_startdate"].ToString() != DBNull.Value.ToString()))
>
> {
>
> DateTime dtEvent = (DateTime)dr["session_startdate"];
>
>
> // = (DateTime)dr["session_startdate"];
>
> if (dtEvent.Equals(e.Day.Date))
>
> {
>
> e.Cell.BackColor = Color.PaleVioletRed;
>
> }
>
> }
>
> }
>
> }
>
> //If the month is not CurrentMonth then hide the Dates
>
> else
>
> {
>
> e.Cell.Text = "";
>
> }
>
> }
>
>



 
Reply With Quote
 
 
 
 
Bob Lehmann
Guest
Posts: n/a
 
      02-02-2006
Either that, or he's 288 time zones away :>

Bob Lehmann

"Joe Van Meer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> seems your system date is off a bit
>
> "Arvind R" <arvind (E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Whats the solution for this?
> >
> > Specified cast 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: Specified cast is not

> valid.
> >
> > Source Error:
> >
> > Line 118: if ((dr["session_startdate"].ToString() !=
> > DBNull.Value.ToString()))
> > Line 119: {
> > Line 120: DateTime dtEvent = (DateTime)dr["session_startdate"];
> > Line 121:
> > Line 122ublic void CalendarDRender(object sender,
> > System.Web.UI.WebControls.DayRenderEventArgs e)
> >
> > {
> >
> >
> > // If the month is CurrentMonth
> >
> > if (!e.Day.IsOtherMonth )
> >
> > {
> >
> > foreach (DataRow dr in ds.Tables[0].Rows)
> >
> > {
> >
> > if ((dr["session_startdate"].ToString() != DBNull.Value.ToString()))
> >
> > {
> >
> > DateTime dtEvent = (DateTime)dr["session_startdate"];
> >
> >
> > // = (DateTime)dr["session_startdate"];
> >
> > if (dtEvent.Equals(e.Day.Date))
> >
> > {
> >
> > e.Cell.BackColor = Color.PaleVioletRed;
> >
> > }
> >
> > }
> >
> > }
> >
> > }
> >
> > //If the month is not CurrentMonth then hide the Dates
> >
> > else
> >
> > {
> >
> > e.Cell.Text = "";
> >
> > }
> >
> > }
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: typecast error! Mark Fitzpatrick ASP .Net 1 02-08-2006 04:45 AM
Re: typecast error! Otis Mukinfus ASP .Net 1 02-04-2006 05:32 PM
generics typecast Tomba Java 8 01-13-2006 02:02 AM
Overloading the typecast operator Nimmi Srivastav C++ 2 02-01-2004 01:24 AM
typecast int to string Venkat C++ 9 01-08-2004 01:51 PM



Advertisments