高分请教急 取出客户访问来路
现在我有a.htm b.htm c.aspx三张页面
以下是代码
a.htm
<html>
<head>
<title> Untitled Page </title>
</head>
<body>
<a href= "b.htm "> 连接到b.htm </a>
</body>
</html>
b.htm
<script language= "javascript " src= "c.aspx "> </script>
c.aspx
<%@ Page Language= "C# " AutoEventWireup= "true " CodeBehind= "c.aspx.cs " Inherits= "_C " %>
c.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _C: System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.IsPostBack)
{
this.Response.Write( "alert( ' " + GetPostPage() + " '); ");
}
}
private string GetPostPage()
{
if (Request.UrlReferrer == null)
{
return "直接输入或者收藏夹打开 ";
}
else
{
return Request.UrlReferrer.AbsoluteUri.ToString();
}
}
}
问题如下:
我用GetPostPage()方法取出的是一直是b.htm 请问怎么才能取到a.htm的地址。高手帮帮忙
------解决方案--------------------<