Sign in to follow this  

[.net] request page title...

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm using the System.Web.UI.Page class to request some web stuff, in a non-web application. Now, is it possible to get, thru some of the classes inside System.Web, the web page title, or links url? Thanks

Share this post


Link to post
Share on other sites
It is not very clear what you want. You could/should use the WebRequest and WebResponse classes. These will contain info on the url. You should post some code or a more precise description of what you're doing...

Cheers

Share this post


Link to post
Share on other sites
What I want is to get the title of the page (<title>), without having to parse the html file myself. And get the links (<href) from a certain page...

Share this post


Link to post
Share on other sites
I'm not sure exactly what the design of your application is, but your best bet might just be Regular Expressions. If the page you are retrieving is valid XHTML, than you can use an xml navigator or XPath. However, I'm not positive off the top of my head if there really is an html page DOM within System.Web.

Share this post


Link to post
Share on other sites
Quote:
Original post by bL0wF1sH
I'm not sure exactly what the design of your application is, but your best bet might just be Regular Expressions. If the page you are retrieving is valid XHTML, than you can use an xml navigator or XPath. However, I'm not positive off the top of my head if there really is an html page DOM within System.Web.


well... thats the prob... the non XHTML valid web pages...

Share this post


Link to post
Share on other sites

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this