Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Page enableEventValidation="true" error

I'm creating a client insert form, in this form has a <asp:HiddenField/> named Id for save selected client id, but when I try submit form, it is on Page enableEventValidation="true" error, when I rename this HiddenField for any other Id, it's work

<asp:HiddenField runat="server" ID="Id" />

My form can submit success when I set enableEventValidation="false", but maybe I will need it in future

How to can I resolve this problem? keep HiddenField named Id

PrintScreen: error message screen

like image 771
Lai32290 Avatar asked Feb 18 '14 09:02

Lai32290


1 Answers

You've pretty much answered your own question. The only way to make this work is set enableEventValidation="false" or rename your HiddenField

Renaming it would be the best solution here, for security reasons

like image 104
roryok Avatar answered Nov 15 '22 09:11

roryok