Link to home
Start Free TrialLog in
Avatar of duclee
duclee

asked on

get host address of the page

Avatar of davidlars99
davidlars99
Flag of United States of America image


Dim strURL As String= _
                "https://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/askQuestion.jsp"
Dim strURL2 As String=Left(str, (Len(str)-15))

lblstr.Text=strURL2
or to do it dynamicaly use "LastIndexOf()" function which is available in both C# and VB.NET


Dim strURL As String= _
                "https://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/askQuestion.jsp"
Dim int As Integer=str.LastIndexOf("/")
Dim strURL2 As String=Left(str, (int+1))

lblstr.Text=strURL2
ASKER CERTIFIED SOLUTION
Avatar of davidlars99
davidlars99
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial