472,782 Members | 3,524 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 software developers and data experts.

Invalid postback or callback argument error

I have a DataList in which the ItemTemplate contains two Button controls
that use EventBubbling. When I click either of them I receive the following
error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

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.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ArgumentException: 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.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: 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.]
System.Web.UI.ClientScriptManager.ValidateEvent(St ring uniqueId, String
argument) +2082588
System.Web.UI.Control.ValidateEvent(String uniqueID, String
eventArgument) +106
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
+32
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210

I had trouble getting the instructions in the error to work. If anybody can
help me here, I would greatly apprecciate it. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Jan 9 '07 #1
2 2107
Nathan Sokalski wrote:
I have a DataList in which the ItemTemplate contains two Button controls
that use EventBubbling. When I click either of them I receive the following
error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

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.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ArgumentException: 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.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: 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.]
System.Web.UI.ClientScriptManager.ValidateEvent(St ring uniqueId, String
argument) +2082588
System.Web.UI.Control.ValidateEvent(String uniqueID, String
eventArgument) +106
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
+32
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210

I had trouble getting the instructions in the error to work. If anybody can
help me here, I would greatly apprecciate it. Thanks.
If this is what I think it may be, then make sure you're not calling the
same sub that pulls from your data source twice.

For instance, if you created a sub procedure that populates your
datalist and you are calling it when the user clicks a button within
your itemtemplate, after the data processing has been done (or whatever
processing you're doing with that button), make sure that it isn't also
being called in your Page_load sub. When your page FIRST loads and you
populate the datalist control, make sure that you have it within a If
Not Page.IsPostBack and not where it gets called on every load.

That's how I ran into the same error.
Jan 9 '07 #2
Nathan,

There is no problem with crossposting. But you are crossposting it so much,
that I expect that you get your answer in another newsgroup than I am active
in for this question.

Cor

"Nathan Sokalski" <nj********@hotmail.comschreef in bericht
news:e4**************@TK2MSFTNGP02.phx.gbl...
>I have a DataList in which the ItemTemplate contains two Button controls
that use EventBubbling. When I click either of them I receive the following
error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

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.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ArgumentException: 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.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: 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.]
System.Web.UI.ClientScriptManager.ValidateEvent(St ring uniqueId, String
argument) +2082588
System.Web.UI.Control.ValidateEvent(String uniqueID, String
eventArgument) +106
System.Web.UI.WebControls.Button.RaisePostBackEven t(String
eventArgument) +32

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.210

I had trouble getting the instructions in the error to work. If anybody
can help me here, I would greatly apprecciate it. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Jan 10 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ray Stevens | last post by:
Anyone see this error that appears to have cropped up with the RTM version of .NET: BASE EXCEPTION:: System.ArgumentException: Invalid postback or callback argument. Event validation is enabled...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
3
by: Martin | last post by:
Hi, I have an aspx page with two dropdownlist controls. I update the options in the second ddl based on selection made in the first. I do this with the ICallbackEventHandler interface, as per...
2
by: Wizzard | last post by:
I have a repeater with and imagebutton on a page useing VS2005 ASP.Net 2.0 <asp:Repeater ID="Repeater1" runat="server" > <ItemTemplate> <div> <asp:ImageButton ImageUrl="button.gif"...
1
by: Ibrahim. | last post by:
Hi, I'm getting the following error when requesting asp.net page. Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in...
3
by: Nathan Sokalski | last post by:
I am recieving the following error on the second postback of a page I have written: The state information is invalid for this page and might be corrupted Stack Trace: ...
2
by: Nathan Sokalski | last post by:
I have a DataList in which the ItemTemplate contains two Button controls that use EventBubbling. When I click either of them I receive the following error: Server Error in '/' Application....
9
by: 200dogz | last post by:
Hi guys, I want to have a button which opens up a new window when pressed. <asp:Button ID="Button1" runat="server" Text="Open new window" /> ... Button1.Attributes.Add("OnClick",
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.