You can use JavascriptResult
to achieve this.
To redirect:
return JavaScript("window.location = 'http://www.google.co.uk'");
To reload the current page:
return JavaScript("location.reload(true)");
Seems the simplest option.
More Related Contents:
- How can I post a list of items in MVC
- Posting JSON Data to ASP.NET MVC
- Rendering Partial Views using ajax
- MVC 4 Edit modal form using Bootstrap
- DisplayName attribute from Resources?
- A field initializer cannot reference the non-static field, method, or property?
- ValidateAntiForgeryToken purpose, explanation and example
- CSS, Images, JS not loading in IIS
- Redirect From Action Filter Attribute
- Email address validation using ASP.NET MVC data type attributes
- How do I implement a custom RazorViewEngine to find views in non-standard locations?
- How to render a Razor View to a string in ASP.NET MVC 3?
- Restrict access to a specific controller by IP address in ASP.NET MVC Beta
- Facebook/ Twitter with dotnetopenauth? [closed]
- How to do a Bulk Insert — Linq to Entities
- ASP.NET MVC – How to show unauthorized error on login page?
- ASP.Net MVC: Calling a method from a view
- How to make Check Box List in ASP.Net MVC
- The operation cannot be completed because the DbContext has been disposed using MVC 4
- I’m getting the “missing a using directive or assembly reference” and no clue what’s going wrong
- Export Model to DataTable
- Date of Birth validation keeps showing
- Test method is inconclusive: Test wasn’t run. Error?
- Effectively use async/await with ASP.NET Web API
- The model item passed into the dictionary is of type ‘mvc.Models.ModelA’ but this dictionary requires a model item of type ‘mvc.Models.ModelB‘
- Keyword Not Supported: Metadata
- AngularJS Web Api AntiForgeryToken CSRF
- ASP.NET – AppDomain.CurrentDomain.GetAssemblies() – Assemblies missing after AppDomain restart
- Complex object and model binder ASP.NET MVC
- Working example for JavaScriptResult in asp.net mvc