Saturday, March 24, 2012

AJAX and page impressions

Hi,

I am trying to keep my page impressions for my site while using AJAX.

Can anyone please tell me why this doesnt work!

<%@dotnet.itags.org. Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Test</title>

</head>

<body>

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<div>

<!-- begin ad tag (tile=1) -->

<script language="JavaScript" type="text/javascript">

ord=Math.random()*10000000000000000;

document.write('<script language="JavaScript" src="http://pics.10026.com/?src=http://ad.uk.doubleclick.net/adj/smartyc.etype/usedcars;make=;model=;tile=1;dcopt=ist;sz=468x60;ord=' + ord + '?" type="text/javascript"></scr' + 'ipt>');

</script><noscript><a href="http://links.10026.com/?link=http://ad.uk.doubleclick.net/jump/smartyc.etype/usedcars;make=;model=;tile=1;sz=468x60;ord=123456789?" target="_blank"><img src="http://pics.10026.com/?src=http://ad.uk.doubleclick.net/ad/smartyc.etype/usedcars;make=;model=;tile=1;sz=468x60;ord=123456789?" width="468" height="60" border="0" alt=""></a></noscript>

<!-- End ad tag -->

</div>

</ContentTemplate>

</asp:UpdatePanel>

<asp:UpdatePanel ID="UpdatePanel2" runat="server">

<ContentTemplate>

<asp:Button ID="Button1" runat="server" Text="Just to post back" />

</ContentTemplate>

</asp:UpdatePanel>

</form>

</body>

</html>

Change Update mode for UpdatePanel1 to Conditional

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode=conditional >



Thanks for your reply, but this is not the result i want.

i want whenever i click the button in UpdatePanel2 to refresh the ad in UpdatePanel1 whitout refreshing the page.

No comments:

Post a Comment