Using tinyurl.com in a .Net application … possible?
I found the following code to create a tinyurl.com url: http://tinyurl.com/api-create.php?url=http://myurl.com This will automatically create a tinyurl url. Is there a way to do this using code, specifically C# in ASP.NET? You should probably add some error checking, etc, but this is probably the easiest way to do it: System.Uri address = new System.Uri("http://tinyurl.com/api-create.php?url=" + YOUR ADDRESS GOES HERE); System.Net.WebClient client = new System.Net.WebClient(); string tinyUrl = client.DownloadString(address); Console.WriteLine(tinyUrl); After doing some more research ... I