PDA

View Full Version : Session value and datagrid Paging



faramarz_s
دوشنبه 25 اسفند 1382, 17:32 عصر
زمانی که خاصیت پیجینگ برای دیتا گرید را تیک زده شود:
اگر از سشنی نظیر این استفاده شود:

Session["NewsId"]=DataGrid1.DataKeys[(int)e.Item.ItemIndex];
وقتی که بخواهیم به صفحات دیگر متصل شویم،پیغام خطای زیر نمایش داده می شود؟!


Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
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

برای دستیابی به سشن مذکور در صفحات دیگر دیتا گرید(صفحاتی دیتا گرید که پیمایش می شوند)ایندکس را چگونه باید ست نمود؟ :!:

faramarz_s
چهارشنبه 27 اسفند 1382, 22:43 عصر
http://www.dotnetforums.net/showthread.php?t=84026