473,409 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Easy way to get HTML Page Title and Meta Description?

Hello

Is there an easy way in asp.net (VB) to get the Title of a Web Page
and the Meta Description of the page?

I was thinking about using a screen scrape and then looking for the
text in the string of the page but I'm wondering if there are any
properties that I could be using instead.

Thanks
M
Aug 19 '08 #1
4 2918
<mi*****@lonelyprogrammer.comwrote in message
news:5a**********************************@y21g2000 hsf.googlegroups.com...
Is there an easy way in asp.net (VB) to get the Title of a Web Page
and the Meta Description of the page?

I was thinking about using a screen scrape and then looking for the
text in the string of the page but I'm wondering if there are any
properties that I could be using instead.
How are you referring to the web page?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 19 '08 #2
MU
On Aug 19, 10:38*am, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:
<mich...@lonelyprogrammer.comwrote in message

news:5a**********************************@y21g2000 hsf.googlegroups.com...
Is there an easy way in asp.net (VB) to get the Title of a Web Page
and the Meta Description of the page?
I was thinking about using a screen scrape and then looking for the
text in the string of the page but I'm wondering if there are any
properties that I could be using instead.

How are you referring to the web page?

--
Mark Rae
ASP.NET MVPhttp://www.markrae.net
Ideally what I'm doing is having a textbox on my web form. The user
will then add a URL that they want to post to their profile. Then my
code will grab that URL and pull out the Title of the page and the
Description from the Metadata.

I'm just starting on this, so any suggestions on how to do it would be
great.

Thanks
Aug 19 '08 #3
"MU" <mi*****@lonelyprogrammer.comwrote in message
news:8e**********************************@b1g2000h sg.googlegroups.com...
>>Is there an easy way in asp.net (VB) to get the Title of a Web Page
and the Meta Description of the page?

I was thinking about using a screen scrape and then looking for the
text in the string of the page but I'm wondering if there are any
properties that I could be using instead.

How are you referring to the web page?

Ideally what I'm doing is having a textbox on my web form. The user
will then add a URL that they want to post to their profile. Then my
code will grab that URL and pull out the Title of the page and the
Description from the Metadata.

I'm just starting on this, so any suggestions on how to do it would be
great.
I'm not aware of any other way than, as you mention, to open a web request
and then parse its HTML stream. Fortunately, this is extremely simple:
http://www.aspcode.net/Fetching-titl...ge-with-C.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 19 '08 #4
MU wrote:
Ideally what I'm doing is having a textbox on my web form. The user
will then add a URL that they want to post to their profile. Then my
code will grab that URL and pull out the Title of the page and the
Description from the Metadata.
You can parse HTML documents with
http://www.codeplex.com/htmlagilitypack or with
http://wiki.developer.mindtouch.com/...mlReader_1.7.2

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Aug 19 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: SteveJ | last post by:
All, Can someone help me solve the next step. First of all let me say I'm new to php. I pieced the following code together from samples I found on the net and a book I bought called PHP...
2
by: sushi | last post by:
Hello, I am developing an asp.net website. I have a web fomr say' webform1.aspx' having two input button html controls. When I click on 'button1' a message appears. Following code is executed o...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
17
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
4
by: David Thielen | last post by:
Hi; If I am using master pages, how do I set the <title> and <meta name='description' content='my title'> for each page. Obviously each page will have a different title & description. --...
21
by: karen987 | last post by:
I have a news website, with asp pages. It has publishing software which allows you to add articles in a database, and then calls them up from links etc. I have added dynamic meta tags in 2 parts. The...
1
by: reemamg | last post by:
Have a piece of code which works in Firefox however doesnt work in IE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <meta...
2
by: lynx129 | last post by:
Hi there , I have php script that works fine under my server but I dont know how to put the html code inside my site. feedback.html <html dir="rtl"> <head> <title> ????? ??? </title>...
4
by: z55177 | last post by:
My domain: http://www.esthevision.cz/ This is the cause of my problem. The template is supposed to look somewhat like this: PINK STRIPE http://themebot.com/website-templates/ht... I created an...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.