Getting Title of a HTML Page

Discussion in 'ASP .Net' started by Lalit Bhatia, Apr 6, 2006.

  1. Lalit Bhatia

    Lalit Bhatia Guest

    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
     
    Lalit Bhatia, Apr 6, 2006
    #1
    1. Advertising

  2. Lalit Bhatia

    Jacob Guest

    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.
     
    Jacob, Apr 6, 2006
    #2
    1. Advertising

  3. Lalit Bhatia

    Lalit Bhatia Guest

    how can I read the markup of other page that I get at run-time?

    Can you give an example?

    --
    Regards,
    Lalit Bhatia
    "Jacob" <> wrote in message
    news:...
    > 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.
    >
     
    Lalit Bhatia, Apr 6, 2006
    #3
  4. Lalit Bhatia

    Jacob Guest

    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.
     
    Jacob, Apr 6, 2006
    #4
  5. Lalit Bhatia

    sloan Guest

    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" <> wrote in message
    news:%...
    >
    > 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
    >
    >
     
    sloan, Apr 6, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    1
    Views:
    495
    Steve C. Orr, MCSD
    Aug 10, 2003
  2. Replies:
    0
    Views:
    577
  3. Replies:
    1
    Views:
    594
    David
    Apr 24, 2007
  4. soonic
    Replies:
    11
    Views:
    1,848
    soonic
    Jul 27, 2011
  5. Russell
    Replies:
    2
    Views:
    327
    Russell
    Sep 13, 2004
Loading...

Share This Page