Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Event Validation

1 view
Skip to first unread message

Neil B

unread,
Jun 2, 2008, 8:44:04 AM6/2/08
to
I'm developing a web site using VS 2008. I added a button to a page that has
C# code when the button is clicked.

protected void UpdateUserAccount_Click(object sender, EventArgs e)
{

*****************************************
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.
*******************************************

Michael Nemtsev [MVP]

unread,
Jun 2, 2008, 8:53:49 AM6/2/08
to
Hello Neil,

did you try to google first? :)
http://www.google.com/search?q=Invalid+postback+or+callback+argument.+Event+validation+is+enabled+using&rls=com.microsoft:*:IE-Address&ie=UTF-8&oe=UTF-8&sourceid=ie7&rlz=1I7DAAU

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


NB> Invalid postback or callback argument. Event validation is enabled
NB> using <pages enableEventValidation="true"/> in configuration
NB>


Nicholas Paldino [.NET/C# MVP]

unread,
Jun 2, 2008, 8:59:49 AM6/2/08
to
Neil,

Well, the page believes that whatever is posting back and firing the
event is not the server control that registered itself when the page was
rendered.

How is the event being triggered?


--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

"Neil B" <Ne...@discussions.microsoft.com> wrote in message
news:CE32C96F-EF6B-43D9...@microsoft.com...

Neil B

unread,
Jun 2, 2008, 9:03:02 AM6/2/08
to
Please disregard the previous question of the same name. It got sent before I
was able to finish the question.

I'm developing a website using VS 2008. I've added a button from the toolbox
to one of my pages. The button should execute C# behind code when the user
clicks it. But when this action takes place I get the error message below.
The method UpdateUserAccount_Click (see code below) is never entered (didn't
hit a breakpoint). It doesn't seem advisable to disable event validation.
This is a common thing to do. So how did I get intangled with the event
validation issue???

Thanks, Neil

<asp:Button ID="UpdateUserAccount" runat="server" BorderStyle="Outset"
onclick="UpdateUserAccount_Click" Text="Update User Account"
ToolTip="Click this button to update your user account." />

protected void UpdateUserAccount_Click(object sender, EventArgs e)
{

.
.

0 new messages