-3
I have this method below, and I need to have a condition that depending on it will open a new tab with a url:
public ActionResult Index()
{
//condição
return Response.Write(@"<script type='text/javascript' language='javascript'>window.open('page.html','_blank').focus();</script>");
}
tried
ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), sb.ToString(), true);
But it always returns that it is not possible to return void
in a method ActionResult
. And I really need you to open a new tab.
Please avoid long discussions in the comments; your talk was moved to the chat - who want to read or proceed, just click on the link
– Bacco