ALL RIGHTS RESERVED. You can also go through our other suggested articles to learn more –, jQuery Training (8 Courses, 5 Projects). In this article, we discussed how to redirect a web page or an URL to another web page using jQuery. $(location).attr("href", "https://google.com"); We can use a button to link different pages. In this article, I would like to explain the difference among "View()" and "RedirectToAction()", "Redirect()" and "RedirectToRoute()" methods. setTimeout(function () { 1. How to Add an HTML Button that Acts Like a Link. Here we discuss a Brief Overview on jQuery redirect and its Examples along with its Code Implementation. On the execution of the code, the original page is directly redirected to the new URL or page https://google.com. Hi! jQuery Quick Tip: This time I'm gonna show you how to redirect a page to another page or website when a user selected a value from a dropdown list and clicked a button. $(this).text("Redirecting...."); So let us discuss about how can we achieve using JQuery code . jQuery; CSharp; HTML5; Excel; More ; Live Examples; Tools . Similarly, create another HTML file and put the following example code inside it. What would you like to do? Description. } In this tutorial, we show you a complete example to use RedirectView class. function pageRedirect() { There are many ways for returning or rendering a view in ASP.NET MVC. June 18th, 2013 store array in viewbag and retrieving in the view. The below screen gets displayed when the above source code is executed. JavaScript. jQuery redirection can be achieved using the two ways, either the plain javaScript or jQuery. For POST request you need form with submit button. There are several ways of redirecting pages, using javaScript or jQuery but jQuery due to its cross browser compatibility, is preferred more than javaScript. Since the code for redirection is put under $(document).ready() function, it will execute as soon as page is loaded. TAGs: ASP.Net, AJAX, jQuery, MVC URL refers to the value of the href attribute. $(document).ready(function () { By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy, 8 Online Courses | 5 Hands-on Projects | 28+ Hours | Verifiable Certificate of Completion | Lifetime Access, Java Servlet Training (6 Courses, 12 Projects), jQuery appendTo() | Parameters | Examples, Software Development Course - All in One Bundle.