Remove Page from Cache
Hi All
here is my Code
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
function MYAJJX()
{
var MYOBJ;
try
{
MYOBJ=new XMLHttpRequest();
}
catch(e)
{
try
{
MYOBJ=new ActiveXObject('msxml2.XMLHTTP');
}
catch(e)
{
try
{
MYOBJ=new ActiveXObject('Microsoft.XMLHTTP');
}
catch(e)
{
alert('NO Suuport');
}
}
}
MYOBJ.onreadystatechange=function()
{
if(MYOBJ.readyState==4)
{
// alert(MYOBJ.responseText);
document.getElementById('lbl1').innerHTML=MYOBJ.re sponseText;
}
}
MYOBJ.open("Get","MYAJAX.aspx","true");
MYOBJ.send(null);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<%--<asp:Button ID="btn" OnClientClick="MYAJJX()" runat="server" Text="Click" />--%>
<input type="button" value="Click" onclick="MYAJJX()" />
<asp:Label ID="lbl1" runat="server" />
</div>
</form>
</body>
</html>
This works absolutely fine.
My Query is when i click first time it retrieve information from page without posting back. But Second click doesn't work. So it keep my page is cache and retrieve information from that and don't give me new value.
Please tell me how to solve this problem
harjinder
__________________
Harjinder
|