duclee
asked on
get host address of the page
my url is https://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/askQuestion.jsp
what function can get this string?? "https://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/"
what function can get this string?? "https://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/"
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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