When i try to click on gridview button then i am getting error like this
Invalid postback or callback argument.
System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using
When i try to click on gridview button then i am getting error like this
System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using
Know the answer? Post it. Somebody with the same question will find it here.
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 22, 2013, 6:14 AM EDT
its happening due to binding the grid view in pageload
if (!IsPostBack)
{
showDataItem();
}
else
{
DataSet tempDs = gvItems.DataSource as DataSet;
gvItems.DataSource = tempDs;
gvItems.DataBind();
}
in the above code why are you binding the grid again because its already binding within showdataItem():
remove this three line and check.
if (!IsPostBack)
{
showDataItem();
}
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 22, 2013, 6:03 AM EDT
Amit Kumar115 reputationPosted Aug 22, 2013, 6:07 AM EDT
and .cs code
Amit Kumar115 reputationPosted Aug 22, 2013, 6:20 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts