Response.Redirect in Javascript or Jquery

Monday, August 2, 2010

In C# or, if you wish to redirect page to some other page then you normally use below code

In C#

and In Vb.Net

But what for Javascript and Jquery, how you will use redirect feature in Javascript and Jquery ?

Here is the solution,

You can achive this Response.Redirect feature in javascript and jquery also by below code,

window.location.href = 'http://' + '<%=Request.Url.Host%>' + '/default.aspx';

Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Senior Asp.Net Developer

e-Procurement Technologies Ltd (India)

No comments :