Hi, After a few successful attempts at inserting data into my new time tracker app, I was met by this error on the page http://localhost/CompanyTimeTracker/TimeTracker/TimeEntry.aspx ----------------------- Specified argument was out of the range of valid values.
Parameter name: duration 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.ArgumentOutOfRangeException:
Specified argument was out of the range of valid values. Parameter name: duration Source Error: Line 41: ProjectList.DataBind() Line 42: UserList.DataBind() Line 43: ProjectListGridView.DataBind() Line 44: Line 45: If ProjectList.Items.Count >= 1 Then --------------------------
It is not on Page_Load. I have not touched a single line of code outside of the wed.config file so I am at a loss as to why it has decided to crack the s*@ts. Any help would be appreciated. Cheers
aspnewbieper...
Member
466 Points
245 Posts
Specified argument error - Parameter name: duration
Feb 14, 2008 02:15 AM|LINK
Prashant Kum...
Star
12334 Points
1992 Posts
Re: Specified argument error - Parameter name: duration
Feb 14, 2008 04:14 AM|LINK
What type of data does the parameter "duartion" hold and what is the value that is generating the error?
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Specified argument error - Parameter name: duration
Feb 14, 2008 04:23 AM|LINK
May be you have to overload UpdateTimeEntry()
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
aspnewbieper...
Member
466 Points
245 Posts
Re: Specified argument error - Parameter name: duration
Feb 14, 2008 04:26 AM|LINK
For some reason, my datatable storing the activity / time entries had 7 entries for the same task.
Some of these had 0 as the duration, causing the problem.
Problem solved.
Cheers
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Specified argument error - Parameter name: duration
Feb 15, 2008 02:54 AM|LINK
Thats Nice
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.