Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> 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.

Please explain me what is this error mean.
I didn't understand what to do.
please do the needful.
Thanks in advance.

Short version, you have a form text field that is trying to pass script directly via your code-behind.

Example:
TextBox contains <a href="http://yourURL.com/">
TextBox contains <script="scriptHere">

Some server configurations prevent passing scripts from forms via code-behind as a security precaution.

Option 1: Disable this security precaution ("<%@ Page EnableEventValidation="true" %> in a page") Not a good option as it opens up many security holes in your application/site
Option 2: Provide alternate text modification methods (such as [ B][ /B]) that are handled at the code-behind level to convert the text to html equivalents so that html code is not being passed from the textbox/source and disable (possibly via RegEx) script from being entered into your textbox/source. Difficult (but not impossible) to code
Option 3: "use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation" simpler to code but still opens possible security issues in your code/site if not handled correctly

Hope this helps :) Please remember to mark solved once your issue is resolved.

Thanks a Lot Lusiphur.*-:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.