Yesterday, I got an email asking how you find out the size of an online resource, like a video or a podcast. The code below will do the trick.
HttpWebRequest hwr =
(HttpWebRequest)WebRequest.Create(URL_TO_ONLINE_RESOURCE);
hwr.Method = "HEAD";
HttpWebResponse resp = (HttpWebResponse)hwr.GetResponse();
string length =
resp.ContentLength.ToString(CultureInfo.CurrentCulture);
resp.Close();