How to redirect if javascript is disabled in asp.net mvc masterpage -


I have a masterpiece on which I want to know that the user has disabled his javascript, then a simple Error. /p>

Just add this code to the masterpage

  & lt; Noscript & gt; & Lt;% Response.Redirect (Url.Action ("ActionName", "ControllerName")); & Gt%; & Lt; / Noscript & gt;  

If the user has javascript disabled then this specific redirect will redirect the action.


Comments