CSharp examples for Network:URL
Expand Url
using System.Web.Mvc; using System.Xml.Linq; using System.Text; using System.Text.RegularExpressions; using System.Net; using System.Web; using System.Linq; using System.Collections.Generic; using System;/*from ww w .j ava 2s . com*/ public class Main{ private static string ExpandUrl(string input) { try { HttpWebRequest req = (HttpWebRequest)WebRequest.Create(input); WebResponse res = req.GetResponse(); return res.ResponseUri.ToString(); } catch { return input; } } }