I have a page with a bunch of text inputs, dropdowns, and buttons. All manipulation of the inputs is done server side. Javascript only adds event listeners which manipulate the contents of the text inputs.
When I remove the unnecessary (dimmed)
using System.Web.UI
I get the annoying "Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation=\"true\"/> in configuration or <%@ Page EnableEventValidation=\"true\" %> in a page. ...
When I put it back in the problem goes away.
Removing javascript and all processing in Page_Load
does not make the problem go away.
How weird is that? What is going on here?
Turns out it was caused by a line break in a <asp:ListItem>Big long item
with a line break</asp:ListItem>
.
Presumably, when the item with the line break was selected, the returned HTML no longer matched the source (since line breaks are converted to a space character).