All pastes #765493 Raw Edit

Something

public text v1 · immutable
·published 2007-11-08 02:10 UTC
rendered paste body
Server Error in '/' Application.
--------------------------------------------------------------------------------

Item has already been added. Key in dictionary: 'Id'  Key being added: 'Id' 
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.ArgumentException: Item has already been added. Key in dictionary: 'Id'  Key being added: 'Id'

Source Error: 


Line 40:     protected void ListAllProjects_RowDeleting(object sender, GridViewDeleteEventArgs e) {
Line 41:         
Line 42:         e.Keys.Add("Id", ListAllProjects.Rows[e.RowIndex].Cells[0].Text);
Line 43:     }
Line 44: }
 

Source File: d:\Inetpub\wwwroot\time\TimeTracker\Project_List.aspx.cs    Line: 42 

Stack Trace: 


[ArgumentException: Item has already been added. Key in dictionary: 'Id'  Key being added: 'Id']
   System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +2807907
   System.Collections.Hashtable.Add(Object key, Object value) +11
   System.Collections.Specialized.OrderedDictionary.Add(Object key, Object value) +49
   Project_List_aspx.ListAllProjects_RowDeleting(Object sender, GridViewDeleteEventArgs e) in d:\Inetpub\wwwroot\time\TimeTracker\Project_List.aspx.cs:42
   System.Web.UI.WebControls.GridView.OnRowDeleting(GridViewDeleteEventArgs e) +133
   System.Web.UI.WebControls.GridView.HandleDelete(GridViewRow row, Int32 rowIndex) +604
   System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +1155
   System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +199
   System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102