VB.NET获取当前url地址
点击次数:62 次 发布日期:2008-11-06 08:05:26 作者:源代码网
|
源代码网推荐
aspx中获取当前url的方法
Protected Function GetUrl() As String
",uURL0@
Dim strTemp As String = ""
If (Request.ServerVariables("HTTPS") = "off") Then
strTemp = "http://"
Else
strTemp = "https://"
End If
strTemp = (strTemp + Request.ServerVariables("SERVER_NAME"))
If (Request.ServerVariables("SERVER_PORT") <> "80") Then
strTemp = (strTemp + (":" + Request.ServerVariables("SERVER_PORT")))
End If
strTemp = (strTemp + Request.ServerVariables("URL"))
If (Request.QueryString.ToString.Trim.Length <> 0) Then
strTemp = (strTemp + ("?" + Request.QueryString))
End If
Return strTem
End Function 源代码网推荐
源代码网供稿. |