I have asp.net mvc 3 application and I need to add some html to html generated by Response.Redirect(). This html should be on this page only if page is redirect from this controller. Any solution?
public class MyController : Controller
{
public ActionResult MyAction(string name)
{
Response.Redirect("/Test/Work");
}
}
There is NO HTML associated with
Response.Redirect– it works on theHTTPlevel (code302)… see MSDN for details http://msdn.microsoft.com/en-us/library/t9dwyts4.aspx .EDIT – as per comments:
IF you want to return HTML or similar (this has NOTHING to do with redirect!) you can call
Content.For details see