i am developpin one application with master page
in the content page i take one datalist and in that one button control is there i want to handle that event when click with item command but when i click it shows the following error
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.
but in either web.confi or page directive can't have

Manikavelu VelayuthamRank #413 · 6K reputationPosted Nov 17, 2010, 9:00 PM EST
Koteswararao MallisettiRank #2,740 · 511 reputationPosted Nov 18, 2010, 12:17 AM EST
existing one is
Manikavelu VelayuthamRank #413 · 6K reputationPosted Nov 18, 2010, 12:24 AM EST
<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="Default.aspx.cs" Inherits="_Default" %>
Its available in the web.config. it will be like below.
<pages enableEventValidation="false">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
controls>
pages>
Manikavelu VelayuthamRank #413 · 6K reputationPosted Nov 18, 2010, 12:25 AM EST
If that error happens in single page, put it in that particular aspx page.
Koteswararao MallisettiRank #2,740 · 511 reputationPosted Nov 19, 2010, 2:42 AM EST
enableEventValidation="false" it is only occur in one page other pages all work fine
Suthish NairRank #92 · 22.8K reputationPosted Nov 19, 2010, 9:59 AM EST
http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=35528
how you binding the records, anything on PageLoad. Always have if(!IsPostBack) check.