how can i download a web page from my web app, then reading “title” and “description” metatag ?
Like a web crawler, but in Asp.net and called by ..an asp.net web page ?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do a screen scrape of an external URL in .NET using the
WebClientclass, which you’ll find in theSystem.Netnamespace. Use theDownloadDatamethod to download the content from a specified URL. The downloaded data comes down as a byte array, but you can convert this to a string.The following snippet shows how to use
WebClientto grab the HTML from my blog’s homepage, http://scottonwriting.net/sowblog/default.aspx:Once you have the markup you can use regular expressions or string searching methods to pick out the markup of interest.