PDA

View Full Version : رفع مشکل the same key already exists



gol20naz
سه شنبه 06 فروردین 1392, 00:24 صبح
Server Error in '/Prozhe' Application.

An entry with the same key already exists.

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: An entry with the same key already exists.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[ArgumentException: An entry with the same key already exists.] System.Collections.Specialized.ListDictionary.Add( Object key, Object value) +5249283 System.Web.UI.WebControls.SqlDataSourceView.Initia lizeParameters(DbCommand command, ParameterCollection parameters, IDictionary exclusionList) +182 System.Web.UI.WebControls.SqlDataSourceView.Execut eDelete(IDictionary keys, IDictionary oldValues) +117 System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary oldValues, DataSourceViewOperationCallback callback) +89 System.Web.UI.WebControls.GridView.HandleDelete(Gr idViewRow row, Int32 rowIndex) +714 System.Web.UI.WebControls.GridView.HandleEvent(Eve ntArgs e, Boolean causesValidation, String validationGroup) +869 System.Web.UI.WebControls.GridView.RaisePostBackEv ent(String eventArgument) +207 System.Web.UI.WebControls.GridView.System.Web.UI.I PostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

gol20naz
سه شنبه 06 فروردین 1392, 00:28 صبح
این پیام زمانی نمایش داده شد که من برای gridview موجود در صفحه ام برای دستور select برنامه نوشتم و یه panel گذاشتم که بشه عکس روی هم اونجا تغییر داد. حالا دستور delete که روی gridview هستش رو کلیک میکنم این پیام خطا میده. وگرنه میخواستم برای delete هم دستور بنویسم که بدون سوال کردن حذف نکنه.
از دوستانی که راهنمایی میکنین صمیمانه تشکر میکنم

fakhravari
سه شنبه 06 فروردین 1392, 20:28 عصر
توی گرید ایدی های هم اسم نداری؟

gol20naz
سه شنبه 06 فروردین 1392, 22:21 عصر
نه نگاه کردم آیدی یکسان نیست، کل دستورای گریدویو و سلکت و دیلیت هم زیادن اگه بخوام بذارم. من بخاطر این خطا کارم لنگ مونده فقط تعطیلاتم وقت دارم روش کار کنم. از اینکه 67 نفر اومدن و مشاهده کردن و جوابی ندادن هم مایوس شدم واقعا. کسی نیست بتونه مشکل منو حل کنه :گریه::گریه: