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?
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?