Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Getting Title of a HTML Page

Reply
Thread Tools

Getting Title of a HTML Page

 
 
Lalit Bhatia
Guest
Posts: n/a
 
      04-06-2006

I have created a page that contain a link of another page.
I want to get the title of that page.
Is there any way to get title of that page?

--
Regards,
Lalit Bhatia


 
Reply With Quote
 
 
 
 
Jacob
Guest
Posts: n/a
 
      04-06-2006
You can have your code read the other page's markup and find the title
tag and extract the contents. That would probably be the easiest.

 
Reply With Quote
 
 
 
 
Lalit Bhatia
Guest
Posts: n/a
 
      04-06-2006
how can I read the markup of other page that I get at run-time?

Can you give an example?

--
Regards,
Lalit Bhatia
"Jacob" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> You can have your code read the other page's markup and find the title
> tag and extract the contents. That would probably be the easiest.
>



 
Reply With Quote
 
Jacob
Guest
Posts: n/a
 
      04-06-2006
I'm not going to write it up for you. But create a WebRequest to get
the page and then read the ResponseStream and (using Regular
Expressions?) grab what is between <title></title>.

You could conceivably cast the response as an HTMLDocument and then use
the framework tools for working with HTMLDocuments.

 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      04-06-2006

Find a post from me

How to screen scrape for results?

or

Re: How to screen scrape for results?



within the past week .. and I posted some code there.








"Lalit Bhatia" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> I have created a page that contain a link of another page.
> I want to get the title of that page.
> Is there any way to get title of that page?
>
> --
> Regards,
> Lalit Bhatia
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm looking for html cleaner. Example : convert <h1><span><font>my title</font></span></h1> => <h1>my title</h1>… Stéphane Klein Python 2 03-30-2010 12:35 AM
Re: I'm looking for html cleaner. Example : convert <h1><span><font>my title</font></span></h1> => <h1>my title</h1>… Stefan Behnel Python 0 03-29-2010 08:14 PM
Friendly Urls with page title in (eg. page-title.aspx) anthonykallay@googlemail.com ASP .Net 1 04-24-2007 08:25 AM
How 2 place page title into window title using sitemap in master page? bednar.tomas@gmail.com ASP .Net 0 11-30-2006 03:17 PM
Fastest way to get a the string between <title> </title> Andreas Klemt ASP .Net 1 08-10-2003 01:58 AM



Advertisments