0

In my application, I have videos with an image. When I click on any video, it is showing this message:

Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

I placed the EnableEventValidation="true" both in web.config in that particular page but it is giving same error.

eglease
  • 2,445
  • 11
  • 18
  • 28
Surya sasidhar
  • 29,607
  • 57
  • 139
  • 219
  • How did you created you image buttons? In the ASPX File? Dynamically in Code? In Page_Load? In Page_Init? In OnPreRender? – Arthur Feb 11 '10 at 12:33
  • yes u r there Mr. Arthur i got the solution simply in my page load i put my method in ispostback method and it is working fine. – Surya sasidhar Feb 12 '10 at 04:11

2 Answers2

0

We need to see some code. But the easiest way to get rid of the error is to turn off EnableEventValidation, just like it says... Set this to "false" for this page and you won't see the error.

Bryan
  • 8,748
  • 7
  • 41
  • 62
0

simple place your method, that fetch the data from the database in "ispostback" method then it will not give any error. i got the same problem i place the code in ispostback method in page load it is working fine.

Surya sasidhar
  • 29,607
  • 57
  • 139
  • 219