我在更新面板(Web 表单/AJAX)的数据列表中添加了一个按钮。我们可以在代码隐藏中使用 Response.RedirectToRoute() 吗?如果可能的话,我当然想发送 cat_id 。
我可以在按钮单击中使用 Response.Redirect :
protected void goto_Click(object sender, EventArgs e)
{
Response.Redirect("Page.aspx?cat_id=3", true); // working
}
我不能在按钮单击中使用 Response.RedirectToRoute:
protected void goto_Click(object sender, EventArgs e)
{
Response.RedirectToRoute("go", new { cat_id= 3 }); //not working
}