Server Error in '/' Application.

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 51:                 dr["Ntype"] = 2;
Line 52:             dr["Ncount"] = 1;
Line 53:             tbr.update(dr);
Line 54:         }
Line 55:         else if (nCountToday > 0) { 

Source File: c:\ReadTheWordsSite\toolbar\DownloadToolbar.aspx.cs    Line: 53

Stack Trace:


[InvalidCastException: Specified cast is not valid.]
   ToolbarDownloads.update(DataRow dr) +399
   toolbar_DownloadToolbar.saveData() in c:\ReadTheWordsSite\toolbar\DownloadToolbar.aspx.cs:53
   toolbar_DownloadToolbar.Page_Load(Object sender, EventArgs e) in c:\ReadTheWordsSite\toolbar\DownloadToolbar.aspx.cs:22
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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