How to resolve links?

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

If I have the code below and I want to check the link:
http://abc.com/test_formRelative.cfm?DoProcess=1

How can that be done? The form link is relative and I'll need to somehow
build the link. Also consider the relative path may look like this:
../test_formRelative.cfm?DoProcess=1
.../test_formRelative.cfm?DoProcess=1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<base href="http://abc.com">
<body>
Please submit the following form.
<form action="test_formRelative.cfm?DoProcess=1" method="post">
<input type="text" name="name" value="myself">
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

Thanks,
Brett
 
Brett said:
If I have the code below and I want to check the link:
http://abc.com/test_formRelative.cfm?DoProcess=1

How can that be done? The form link is relative and I'll need to somehow
build the link. Also consider the relative path may look like this:
./test_formRelative.cfm?DoProcess=1
../test_formRelative.cfm?DoProcess=1

\\\
Dim s1 As String = "http://www.example.org/shop/cart/"
Dim s2 As String = "./../buy/?id=123"
Dim u As New Uri(New Uri(s1), s2)
MsgBox(u.AbsoluteUri)
///

BTW: Be careful with sample URLs. For example, the domain abc.com does
exist...

RFC 2606 - Reserved Top Level DNS Names
<URL:http://www.faqs.org/rfcs/rfc2606.html>
 
Back
Top