i have a action tresult method and in it i want to open a url in new window or new tab how can i handel it ?
in my code it works not i mean redirect it to member account and do not open my url
public ActionResult myactionresult()
{
Response.Write("<script language=\"javascript\">");
Response.Write("window.open('" + "http://www.xxx.com" + ,'_blank')");
Response.Write("</script>");
return RedirectToAction("Index", "MembersAccount");
}
Try this instead :
Controller
View : Any where in view’s body
This will fix your problem;