Powered By Blogger

Dynamic meta description and keyword tags for your MasterPages

Today we're going to look at a technique for dynamically inserting meta tags into your master pages. By taking control of the head tag and inserting your own HtmlMeta you can easily customise these tags.Might have noticed that when you create a new master page in visual studio your tag gets decorated with a runat="server" attribute.Asp.net doesn't add this kind of decoration to any other html tags (although you are free to add it if you want). So what makes the head tag special?By adding the runat="server" you're giving actually converting the control into a HtmlHead control. That doesn't particularly matter for this tutorial other than to note that given a reference to the head control you get all the extras that come with asp.net controls such as access to its controls collection.

3 comments:

Anonymous said...

This is good information

Dynamic Packaging Software said...

The information you've provided is useful because it provides a wealth of knowledge that will be highly beneficial to me. Thank you for sharing that. Keep up the good work. Dynamic Packaging Solutions

Cell max power said...

Interesting article with valuable insights. Very helpful for those searching for a trusted 5KWh lithium battery in karachi

Post a Comment

Followers