我想知道当前登录网站的用户正在浏览哪个页面,然后得到此页面的文件名称!领导让我实现的一个程序中用到这个!可我不会很郁闷!我是新手,希望各位高手帮帮忙!

解决方案 »

  1.   

     获取url       根据格式截取所在的页面地址...
      

  2.   


       string strURL = Request.Url.AbsoluteUri;
               
               strURL = strURL.Substring(strURL.LastIndexOf("/")+1, strURL.Length - strURL.LastIndexOf("/")-1 );
               ScriptManager.RegisterStartupScript(this, this.GetType(), "", "alert('" + strURL + "');", true);