Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get current URL in vb.net

I am making a website in visual studio 2010 (in visual basic) and I really need to know how to get the URL from a VB statement (in the aspx.vb file, on page load).

like image 445
user3483317 Avatar asked Apr 04 '14 01:04

user3483317


1 Answers

There's a few properties that can give you the information. Here's an example.

Dim url As String = HttpContext.Current.Request.Url.AbsoluteUri
Dim path As String = HttpContext.Current.Request.Url.AbsolutePath
Dim host As String = HttpContext.Current.Request.Url.Host
like image 178
the_lotus Avatar answered Sep 25 '22 02:09

the_lotus