Invalid postback or callback argument.

R

Robak_2

I have problem with Button in DataList.

protected void Page_Load(object sender, EventArgs e)
{
string categoryId = this.Request.QueryString["CategoryID"];
ProductsList1.DataSource = GenericDataAccess.ProductList(categoryId);
ProductsList1.DataBind();
}

I used ItemCommand from datalist Events to send a value on another
page.

protected void List_CommandItem(object source, DataListCommandEventArgs
e)
{

string productId = e.CommandArgument.ToString();
Response.Redirect("temp.aspx?X="+productId);

But i have error like this:

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.

Any idea?
 
N

NeverGiveUp

Try this:

In IIS, on your application's settings, there should be a tab that says
"ASP.NET". In that tab, select ASP.NET Version 1.1 instead of 2.0

Hope it works for you as it fixed my problem since I have been
developing on Version 1.1.
 
N

NeverGiveUp

Try this:

In IIS, on your application's settings, there should be a tab that says
"ASP.NET". In that tab, select ASP.NET Version 1.1 instead of 2.0

Hope it works for you as it fixed my problem since I have been
developing on Version 1.1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top