Get .txt file instead of .jpg - using Webclient
and DownloadFile();
I'm trying to download the .jpg from this URL:
Using this code:
private void TEST_button1_Click(object sender, EventArgs e)
{
WebClient MyDownloader = new WebClient();
MyDownloader.DownloadFile(@"http://1.bp.blogspot.com/_pK6J3MTn5co/S6kuH3aqbeI/AAAAAAAACUY/06axvmjU91k/s1600-h/avengers02_B&W_UL.jpg", @"c:\test.jpg");
}
However, when I run this, I end up with a file called test.jpg, which contains html mark up... :
<html>
<head>
<title>avengers02_B&W_UL.jpg (image)</title>
<script type="text/javascript">
<!--
if (top.location != self.location) top.location = self.location;
// -->
</script>
</head>
<body bgcolor="#ffffff" text="#000000">
<img src="http://1.bp.blogspot.com/_pK6J3MTn5co/S6kuH3aqbeI/AAAAAAAACUY/06axvmjU91k/s1600/avengers02_B%26W_UL.jpg" alt="[avengers02_B&W_UL.jpg]" border=0>
</body>
</html>
How can I download the actual .jpg?
Any help is greatly appreciated - thank you!