Based on your comments:
What if it is a secure (https) site or an FTP site?
and
Will this work? What if http is already in the input? What if it is a secure (https) site or an FTP site?
and
The problem is that the user places the URL “google.com”, then the link will be processed as “http: //localhost/google.com”. I have to put "http://www.google.com" so that it gets to the right place.
Is it possible to consider a link as if it is an absolute link in all cases?
You ask for magic. Here we do not specialize in magic. You must specify something that lets you know that it can become a specific type of domain. Tell them if they don’t specify the protocol you will be like http: // and the rest of the time they need to specify the protocol. That is all you can do.
As for determining whether he received a protocol, check string.Contains("://") , as the browser will do this anyway, more or less.
jcolebrand
source share