0
我有一個行動tresult方法,並在其中我想要在新窗口或新標籤頁中打開一個網址,我該如何處理它?如何打開瀏覽器的行動結果?
在我的代碼它的作品不是我的意思是重定向到會員帳戶,不開我的網址
public ActionResult myactionresult()
{
Response.Write("<script language=\"javascript\">");
Response.Write("window.open('" + "http://www.xxx.com" + ,'_blank')");
Response.Write("</script>");
return RedirectToAction("Index", "MembersAccount");
}
我的重定向必須發生在行動導致你的情況下任何重定向將發生 – motevalizadeh
@motevallizadeh,你想通過actionresult打開另一個窗口,並不想打開該perticular動作? –
@ Kundan Singh Chouhan,是的,我打開它後,它最後一行重定向到我的行動 – motevalizadeh