locked
Specified argument error - Parameter name: duration RRS feed

  • Question

  • User-1427396445 posted
    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
    Wednesday, February 13, 2008 10:15 PM

Answers

  • User-1427396445 posted

    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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 14, 2008 12:26 AM

All replies

  • User-2005691517 posted

     What type of data does the parameter "duartion" hold and what is the value that is generating the error?

    Thursday, February 14, 2008 12:14 AM
  • User555306248 posted

    May be you have to overload UpdateTimeEntry()

    Thursday, February 14, 2008 12:23 AM
  • User-1427396445 posted

    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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 14, 2008 12:26 AM
  • User555306248 posted

    Thats Nice

    Thursday, February 14, 2008 10:54 PM