In this article will explain how to page redirect
one page to another page with Button click event using JQuery in ASP.NET.
Sample Code:
<script type="text/javascript">
$(function () {
$("#btnclick").click(function ()
{
var url = ‘http://vatturidotnet.blogspot.in/';
$(location).attr('href',
url);
})
});
</script>
Total page design code:
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
</head>
<body>
<form runat="server" id="Redirect">
<asp:Button Text="Redirect" ID="btnclick" runat="server" />
<script type="text/javascript">
$(function () {
$("#btnclick").click(function ()
{
var url = ‘http://vatturidotnet.blogspot.in/';
$(location).attr('href',
url);
})
});
</script>
</form>
</body>
</html>
No comments:
Post a Comment