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
Suthish NairPosted Nov 19, 2010, 2:59 PM
http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=35528
how you binding the records, anything on PageLoad. Always have if(!IsPostBack) check.
Koteswararao MallisettiPosted Nov 19, 2010, 7:42 AM
enableEventValidation="false" it is only occur in one page other pages all work fine
Manikavelu VelayuthamPosted Nov 18, 2010, 5:25 AM
If that error happens in single page, put it in that particular aspx page.
Manikavelu VelayuthamPosted Nov 18, 2010, 5:24 AM
<%@ 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>
Koteswararao MallisettiPosted Nov 18, 2010, 5:17 AM
existing one is
Manikavelu VelayuthamPosted Nov 18, 2010, 2:00 AM