DataGrid儲存資料時出現錯誤解決辦法.
阿新 • • 發佈:2019-01-25
解決辦法:
前臺設定DataGrid
DataKeyField="ID"
錯誤提示:
Index was out of range. Must be non-negative and less than the size of the collection.
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: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source Error:
Source File: e:/aspxproject/news/datagridedit.aspx.cs Line: 95
前臺設定DataGrid
DataKeyField="ID"
錯誤提示:
Server Error in '/News' Application.
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 code. Exception Details:
Parameter name: index
Source Error:
Line 93: { |
Source File: