TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Joakim Astrom
NA
21
0
Webclient doesn't support frames
Oct 18 2009 5:12 PM
Hello people! This is my first post here. I am currently developing an application that is supposed to get data from a website, get some product information, then place it in a database etc.
I am using webclient but the url I want to retrieve from only returns part of the page and with the message "your browser does not support frames".
How can I get the "full" page downloaded so I can parse the html(string) using my RegEx expressions? In other words get the same html as I get when I manually use the right-click and view source on the url?
I will paste some info below. Thanks in advance for all help.
WebClient fileReader = new WebClient();
fileReader.Credentials = credentialCache.DefaultCredentials;
fileReader.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
Stream data = fileReader.OpenRead(url);
StreamReader sr = new StreamReader(data);
string html = sr.ReadToEnd();
infoTextBox.AppendText(html);
Reply
Answers (
9
)
Access database locally
Items in one class interacting with characters from another?