http://localhost:1147/test/test.aspx
如果上面这样,我想取得:http://localhost:1147/test/http://localhost:1147/test/web/test.aspx
如果上面这样,我想取得:http://localhost:1147/test/web/我知道用ASP可以这么写
sServer_Name=Request.ServerVariables("HTTP_HOST")
sServer_Path=Request.ServerVariables("PATH_INFO")
If Len(sServer_Path)>0 Then sServer_Path=Left(sServer_Path,InstrRev(sServer_Path,"/"))
SiteUrl="http://"&sServer_Name&sServer_Path
我想请问咱们asp.net/c#里应该怎么写?