Here I will explain how to refresh or reload webpage using Jquery in asp.net.
In previous article I explained expand textbox on focus and disable right click on image using JQuery and many articles relating to JQuery. Now I will explain how to refresh or reload webpage using JQuery in asp.net.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="10" />
<title>Refresh or reload web Page using meta tags</title>
</head>
<body>
<form id="form1"
runat="server">
<div>
</div>
</form>
</body>
</html>
|
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JQuery Refresh or reload web Page using asp.net</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script type="text/javascript" language="javascript">
$(document).ready(function()
{
$('#btnClick').click(function() {
location.reload();
})
})
</script>
</head>
<body>
<form id="form1"
runat="server">
<div>
<asp:Button ID="btnClick"
runat="server"
Text="Click"
/>
</div>
</form>
</body>
</html>
|
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JQuery Refresh or reload web Page using asp.net</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script type="text/javascript" language="javascript">
$(document).ready(function()
{
setTimeout("RefreshPage()", 10000);
})
function RefreshPage() {
location.reload();
}
</script>
</head>
<body>
<form id="form1"
runat="server">
<div>
<asp:Label ID="lbltxt"
runat="server"/>
</div>
</form>
</body>
</html>
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
Subscribe by RSS
Subscribe by Email
2 comments :
very nice!
Hi,
Really good for beginners. I would like to point out one thing, that you have mentioned "First Method" twice.
Arun @http://www.encodedna.com