I added a button in datalist in updatepanel (Web Forms/AJAX). Can we use Response.RedirectToRoute() in codebehind? I would like to send cat_id with it ofcourse if it's possible.
I can use Response.Redirect in button click :
protected void goto_Click(object sender, EventArgs e)
{
Response.Redirect("Page.aspx?cat_id=3", true); // working
}
I can't use Response.RedirectToRoute in button click:
protected void goto_Click(object sender, EventArgs e)
{
Response.RedirectToRoute("go", new { cat_id= 3 }); //not working
}
I was going to be crazy.. i saw it's visual studio's problem. Response.RedirectToRoute(); is working in UpdatePanel. However, i coudn't understand why it didn't work (because it's same code) for a length of time.
Cheers