-1

我在更新面板(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
}


4

1 回答 1

0

我要疯了..我看到这是视觉工作室的问题。Response.RedirectToRoute(); 正在更新面板中工作。但是,我不明白为什么它在很长一段时间内都不起作用(因为它是相同的代码)。

干杯

于 2016-02-24T17:27:05.587 回答