Monthly Archives: November 2016

gridview will not update does not give no error

GridView in ASP.NET will not update but it give no error. This took some 1+ hour of mine trying to resolve. I looked at this popular post but I could not find solution to my problem.

The problem in my case was the select statement.

The problem line was @IndID parameter, although my Gridview worked perfectly fine. I removed the where clause just for testing purpose and the update started function fine. So the problem is quite weird, select should not affect update operation but in this case it does!

Besides, also look into DataKeyNames parameter of gridview and set it to your primary key, usually ID field.

Invalid postback or callback argument ASP.NET

I got this error

I got this error because I was using a ready made html5 template. The problem was duplicate form tag used multiple times in the template. Removing that get rid of the error.

To be exact my duplicate form tag was in the master page which was a bit hard to find.