Posted By

sekihin on 03/13/08


Tagged

VBNet


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

startupbrite


Get URL


 / Published in: VB.NET
 

  1. Public Function GetUrl() As String
  2. Dim strTemp As String = ""
  3. If (Request.ServerVariables("HTTPS") = "on") Then
  4. strTemp = "https://"
  5. Else
  6. strTemp = "http://"
  7. End If
  8. strTemp = (strTemp + Request.ServerVariables("SERVER_NAME"))
  9. If (Request.ServerVariables("SERVER_PORT") <> "80") Then
  10. strTemp = (strTemp + (":" + Request.ServerVariables("SERVER_PORT")))
  11. End If
  12. strTemp = (strTemp + Request.ApplicationPath)
  13. Return strTemp
  14. End Function

Report this snippet  

You need to login to post a comment.