473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

AJAX and ASP.Net 2.0 Problem for EnableEventValidation

Hi There,

I've problem while I submit a button where I used AJAX, I created
simple page which will search the customer name from database using
AJAX. Once I search customer ID i need to search order related to that
customers. So on my page I've Search Button(Image Button).. Now if I
click on search button without selecting the customer from the result
which I get from AJAX method then it will work fine but if I select a
customer ID from the list which is populated by AJAX Method then I
click on search button it throws this error.. I dont know why?

Could you please explain about this that will be highly appriciated?
I'm attaching my full error message for your reference.

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.

Thanks and look forward to hear from you.

Mihir

Jan 4 '06 #1
1 5765
to prevent hacking, asp.net validates postback values when it can. if the
postback is from a select (dropdown), then the value must be on the list of
values rendered. your JavaScript is probably adding an option, then posting
back - triggering the validation code. you must turn the validation off in
your case using either method mentioned in the error.

-- bruce (sqlwork.com)


"Mihir" <mi*******@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi There,

I've problem while I submit a button where I used AJAX, I created
simple page which will search the customer name from database using
AJAX. Once I search customer ID i need to search order related to that
customers. So on my page I've Search Button(Image Button).. Now if I
click on search button without selecting the customer from the result
which I get from AJAX method then it will work fine but if I select a
customer ID from the list which is populated by AJAX Method then I
click on search button it throws this error.. I dont know why?

Could you please explain about this that will be highly appriciated?
I'm attaching my full error message for your reference.

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.

Thanks and look forward to hear from you.

Mihir

Jan 5 '06 #2

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

Similar topics

0
by: Darren.Ratcliffe | last post by:
Hi everyone I am getting the above problem when I am trying to use AJAX on my Visual Studio 2005 solution - I seem to keep getting it when I click the back button in my browser. (And, the...
0
by: UJ | last post by:
I have an ASP.Net v1.1 application that gets the error Error Message:Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/in configuration or...
2
by: Rahul | last post by:
I am trying the following thing in AJAX <atlas:ScriptManager ID="scriptmanager1" runat="Server" EnablePartialRendering="true" /> <asp:DropDownList ID="cmbBranchname" cssclass="Combostyle"...
0
by: john_c | last post by:
Sometimes I get this error in an aspx page: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/in configuration or <%@ Page...
2
by: =?Utf-8?B?V2luRGV2?= | last post by:
I have a couple of pages that are throwing the following error: HTTPUnhandledException and the text of the message is: Invalid postback or callback argument. Event validation is enabled using...
1
by: yoni12ab | last post by:
Hi Im new in my job never configure iis the problem is that I reinstalled visual studio 2003 becouse of debugger problem and the local web site was working fine and now it doesent work it giving...
0
by: Ronald S. Cook | last post by:
I'm using AJAX controls ScriptManager and UpdatePanel for the first time. as I want a webpage that contains an embedded Windows Media Player to not be interrupted as other clicks and events...
4
by: Lewis Holmes | last post by:
Hi I have the following situation in one of my asp.net pages. The user can add multiple table rows to a form by selecting a button. These rows can contain asp.net controls. When this button is...
0
by: Heron | last post by:
Hi, I have a listbox (lstItems) that I want to populate with the items in another listbox (lstSelected) that's in a modalpopupextender. The update is supposed to happen when I close the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.