I have a C# asp page that needs to record a hit and redirect, but the Javascript isn't executing and the redirect beats the JS execute.
The Javascript needs to execute, and the redirect passes the QueryString parameter to the next page. This page is actually to record the impression.
Is there an alternative way of doing this, or storing the redirect in another event method in the codebehind?
Code:
<head runat="server">
<title></title>
<script src="[URL unfurl="true"]http://www.myserver.com/record.php?siteid=215&wayid=922&prodid=recordcode"[/URL] language="JavaScript" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>Redirect</h1>
<!-- add Client Control Center's tracking pixel -->
<%
// add Client Control Center's API integration
try
{
codeID = Request.QueryString["code"];
// could make db call here, but the request may take too long
// using the existing link may be good, however if CardOffers changes the link, this will break
Response.Redirect("[URL unfurl="true"]http://www.redirectsite.com/manage/track/e.asp?ID="[/URL] + codeID);
}
catch (Exception ex)
{
}
%>
</div>
</form>
</body>
The Javascript needs to execute, and the redirect passes the QueryString parameter to the next page. This page is actually to record the impression.
Is there an alternative way of doing this, or storing the redirect in another event method in the codebehind?