The importance of search engine optimized page title and meta tags:
May be you will need to read about seo in general from here before you startAs a asp.net developer it is very important when you start to build a web site to make it search engine friendly as possible to get the maximum number of free traffic. One of the most important requirement for any webpage to be search engine friendly is to have a unique,unrepeated and very closely related page title and meta tags. Search engine is giving a a great importance to the text present in the page title and think it the best way to discover what the page is about ,also search engine use your description meta tag( if you used it properly ) to write the page description that appear below the page title in the search result.
When you have a unique description meta tag that is very related to your page content the search engine will use it but if the description meta tag is not unique too short or not related to the page the search engine will choose other text from the page and use it as a description for your page. That automatically chosen text won’t be sexy for the people to click at which can affect you traffic badly. Also if the page title is repeated or not related to the page you will rank very low for your targeted keywords because there will be other competitive pages with a better page titles .
Page titles and meta tags generation in asp.net:
As an asp.net developer you should learn how to generate and control page titles and meta tags dynamically.
For any physical asp.net page that has only one version like the “contact us” page or “about the company” page there will be no problem you just will set the page title and the meta tags statically like if you are preparing a simple html page.Just find the title attribute in the page declaration part of the asp.net aspx page(usually the first line in page ),and set the title property to the value you want and for the meta tags you just add it to the head part of the page like thgis
<META NAME=”description”CONTENT=”your page description”/>
But the problem is in the asp.net pages that display a different row from the data base every time based on the query string value or something. Also the pages that display contents based on the user country or language.
As i want this article to be easy to understand for the beginner asp.net developer i will explain a very basic example here. We have a scenario that we want to make a details page that display the details of a single product selected on the base of the query string field called “productid”. Sure we will need to generate page title and meta tags dynamically because search engine will see “/productdetails.aspx?productid=1” and “/productdetails.aspx?productid=2” as a totally different pages that must have different page titles,also suppose that the first page is displaying a football and the other page displaying a diving equipment so the page title have to be generated every time the asp.net page load to be related to the product displayed and rank high when someone search for the diving eq. for example.
so time for coding
Generating page title and meta tags dynamically explained vb.net code example:
To fulfill the requirement of the scenario described above we will add a three fields to the data base “pagetitle”,”descriptionmeta ” and “keyeordmeta” to store the page title and meta tags for each product these fields should be filled by the seo specialist.
We can make it easier by using product name as the page title and the product description as the page meta description but i prefer separating what is for humans from what is for search engines because each has it’s rules.
Prepare a page containing form view the form view will display one row from the products table on the base of the query string passed with the url.
add two data bound asp.net labels to the asp.net formview with ID’s “ptitlelbl”, “mdisclbl” the first id data bounded to the data base field that hold the page title and the other is bounded to the meta description field.
and here is the code behind
Page title:
in the page load event add the following code
Dim ptitle As String
ptitle = DirectCast(FormView1.FindControl(“ptitlelbl”),Label).Text
If String.IsNullOrEmpty(ptitle) ThenElse
Page.Title = ”any thing you want to append”&ptitle
End If
and you done just be sure that there is no static page title tag anywhere (page declaration section,header section of the aspx file or in the master page) not to have unexpected results.
1-we declared a variable to hold the title.
2-we used “formview1.findcontrol” function to find the asp.net label we want inside the formview(notice form view is naming container so you cant access the control inside it directly like usual ).
3-we check first if the variable is not empty to prevent the ugly looking exception.
4-we used “directcast” because “findcontrol” function return an undefined control so to define the returning object as a label we use “directcast” function.
5-then we set the “title” property of the “page” object to the value we extracted from the data base and append to it any text we want(may be product category for example) .
Meta tags(description ex. ):
also in the page load event add the following vb.net code
Dim ptitle As String
disctext = DirectCast(FormView1.FindControl(“mdisclbl”),Label).Text
If String.IsNullOrEmpty(disctext) ThenElse
Dim headsection As HtmlHead = CType(Me.Header,HtmlHead)
Dim discmetatag As HtmlMeta = New HtmlMeta()
discmetatag.Name = “Description”
discmetatag.Content = “any thing you want to append ,”& disctext
headsection.Controls.Add(discmetatag)
End If
here the code is similar to the code above except:
1-first we create an instance of our page head section.
2-next we defined a new html meta object.
3-we set its name proberity to “description”(or keyword if you want)
4-then set its content to the text we extracted from the data base.
5-finally we add the meta tag object we created to our page header section
and you are done
some useful tips in generating asp.net page title and description meta tags:
1-it is sometimes important to add different countries or cities to the page title and meta tags because people usually search for service that is located close to them.For example if you have a car rent website may be you should dynamically generate many instances of your pages each one is targeted to different cities in your country.believe me it is great tip you should try it if you are making a website that offer a local service.
2-put the most important text in your page in a h1 tag. in our case above it will make a great difference to put the product name asp.net label in a h1 tag and may be making it bold text also.
3-it is far better to have only h1 tag in each page not more this will keep your page targeted.
IF YOU WANT TO KNOW HOW TO SELECT YOUR KEY WORDS READ THIS
happppy coding and alot of money.
dr A. galal
asp.net developer and seo specialist.
dr.agalal@speakasp.net

Just read this ……
I am impressed with this website ,rattling I am a fan ….
It is quite hard to find good help…
I am really forever proclaiming that its hard to find good honest help,but here is…
frostwire download…
[...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose frostwire download [...]……
Cool sites…
[...]we came across a cool site that you might enjoy. Take a look if you want[...]……
Awesome website…
[...]the time to read or visit the content or sites we have linked to below the[...]……
Recent Additions……
[...] The material talked about inside the article are some of the most efficient out there [...]…
Our Trackback……
[...]very few websites that happen to be detailed below,from our point of view are undoubtedly well worth checking out[...]………
Websites to check…
[...] needs fairly long time for getting great results. One should always have real patience [...]…
Recent Blogroll Additions…
[...]usually posts some very interesting stuff like this. If you’re new to this site[...]…
Related……
[...]just beneath,are numerous totally not related sites to ours,however,they are surely worth going over[...]……
ccleaner download…
[...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose ccleaner download [...]……
Best additions…
[...] one among our guests recently recommended the following site [...]…
Locksmith in Toronto…
Locksmith expert services assist deliver safety measures and luxury for your home….
Websites you should visit…
[...]below you’ll find the link to some sites that we think you should visit[...]……
Looking around…
I like to surf around the internet,regularly I will go to Stumble Upon and follow thru…
You should check this out…
[...] Wonderful story,reckoned we could combine a few unrelated data,nevertheless really worth taking a look,whoa did one learn about Mid East has got more problerms as well [...]……
porno…
[...]that could be the finish of this write-up. Here you will obtain some internet sites that we consider you will appreciate,just click the links over[...]…
toronto escorts…
[...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose toronto escorts [...]……
ares free download…
[...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose ares free download[...]……
Superb webpage…
[...] only a couple of websites that had been shown below,from our opinion are undoubtedly well worth going over [...]…
Great website…
[...]we like to honor many other internet sites on the web,even if they aren’t linked to us,by linking to them. Under are some webpages worth checking out[...]……
Read was interesting,stay in touch……
[...]please visit the sites we follow,including this one,as it represents our picks from the web[...]……
…[Trackback]…
[...] Read More:speakasp.net/blog/index.php/web-developing/generating-search-engine-optimized-meta-tags-page-title-asp-net [...]…
…[Trackback]…
[...] Read More:speakasp.net/blog/index.php/web-developing/generating-search-engine-optimized-meta-tags-page-title-asp-net [...]…
Awesome webpage…
[...] Now when a person looks at the latest fashion assertion,it can be measurement zero [...]…
Best additions…
[...] one among our guests fairly recently commended the following websites [...]…
………..
My spouse and i suppose for now i’m going to be satisfied with book-marking as well as incorporating the Rss in order to my personal Search engines bank account. I enjoy brand new improvements and definately will talk about this particular site using …
…[Trackback]…
[...] Informations on that Topic:speakasp.net/blog/index.php/web-developing/generating-search-engine-optimized-meta-tags-page-title-asp-net [...]…
Sites You Should Check Out…
http://www.e-psychic-readings.com/horoscope-yahoo...
Online Article……
[...]The information mentioned in the article are some of the best available [...]……
No Deposit Poker…
You really make it seem so easy along with your presentation but I to find this matter to be actually one thing which I feel I’d by no means understand. It seems too complex and extremely large for me. I’m looking ahead to your subsequent publish,I…
Hello…
Nice read,I just passed this onto a friend who was doing some research on that. And he actually bought me lunch because I found it for him smile So let me rephrase that:Thank you for lunch! “To be 70 years young is sometimes far more cheerful and ho…
My opinion is ……
I always was interested in this subject and stock still am,regards for posting ….
free microsoft points…
[...]Sites of interest we have a link to free microsoft points[...]……
Blogs to Save…
[...]just beneath,are numerous totally unrelated pages to ours,however,they are definitely worth going over[...]……
download bearshare…
[...]usually posts some very interesting stuff like this. If you’re new to this site download bearshare[...]……
online watch movies…
[...]An interesting discussion is value comment. I think that you must write extra on this topic,it won’t be a taboo topic however usually individuals are not sufficient to speak on such topics. To the next. Cheers[...]…
…[Trackback]…
[...] There you will find 46925 more Infos:speakasp.net/blog/index.php/web-developing/generating-search-engine-optimized-meta-tags-page-title-asp-net [...]…
adobe photoshop cs5…
[...]always a big fan of linking to bloggers that I love but don’t get a lot of link love from adobe photoshop cs5[...]……
Check this out…
[...] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate,just click the links over[...]……
nero free…
[...]just beneath,are numerous totally not related sites to ours,however,they are surely worth going over nero free[...]……
Visitor recommendations…
[...]one of our visitors recently recommended the following website[...]……
[...]the time to read or visit the content or sites we have linked to below the[...]……
[...]here are some links to sites that we link to because we think they are worth visiting[...]……
isohunt music download…
[...]here are some links to sites that we link to because we think they are worth visiting isohunt music download[...]……
…[Trackback]…
[...] Read More here:speakasp.net/blog/index.php/web-developing/generating-search-engine-optimized-meta-tags-page-title-asp-net/ [...]…
Sites We Like…
[...]just below,are some totally unrelated sites to ours,however,they are definitely worth checking out[...]…
Sites We Like…
[...]just below,are some totally unrelated sites to ours,however,they are definitely worth checking out[...]…
Sites You Should Check Out…
http://www.demo.getlisted.co.nz/marketing-auckland...
[...]Sites of interest we have a link to[...]……
[...]usually posts some very interesting stuff like this. If you’re new to this site[...]……
[...]the time to read or visit the content or sites we have linked to below the[...]……
[...]here are some links to sites that we link to because we think they are worth visiting[...]……