I have a usercontrol with a button on it. It's supposed to submit the usercontrol data to server.
It gives eventvalidation error, unless I put the enableEventValidation=false as page attribute. To avoid doing that I am trying to register the event.
I use this code:
Page.ClientScript.RegisterForEventValidation(button1.UniqueID, this.ToString());
and it works fine on one page, but not on another.
I also tried using callback functionality, and used:
Page.ClientScript.ValidateEvent(button1.UniqueID, this.ToString());
inside the RaiseCallbackEvent() function.
This also worked fine on one page, but not on others!
I am not able to find the reason for its failure on the 'other' pages. These pages contain many controls, and the code is quite large to place here.
Any pointers on what may be causing the problem?
Thanks a million in advance,
Sheila
It gives eventvalidation error, unless I put the enableEventValidation=false as page attribute. To avoid doing that I am trying to register the event.
I use this code:
Page.ClientScript.RegisterForEventValidation(button1.UniqueID, this.ToString());
and it works fine on one page, but not on another.
I also tried using callback functionality, and used:
Page.ClientScript.ValidateEvent(button1.UniqueID, this.ToString());
inside the RaiseCallbackEvent() function.
This also worked fine on one page, but not on others!
I am not able to find the reason for its failure on the 'other' pages. These pages contain many controls, and the code is quite large to place here.
Any pointers on what may be causing the problem?
Thanks a million in advance,
Sheila