Meta Tags undoubtedly play a major role in website promotion. Search engines use meta tags to obtain webpage-related information, such as keywords and description. If ASP. net to dynamically generate pages, especially when using template pages, it seems that you cannot add meta information to each page. Otherwise, you can add meta information to your own ASPX page by programming.
Protected void page_load (Object sender, eventargs E)
{
Htmlmeta metakeywords = new htmlmeta ();
Htmlmeta metadeworkflow = new htmlmeta ();
Metakeywords. Name = "keywords ";
Metakeywords. content = "milk ";
Metadeworkflow. Name = "Description ";
Metadegion. content = "** Brand milk ";
Header. Controls. Add (metakeywords );
Header. Controls. Add (metadeworkflow );
}
You can store keywords and description in the database, Dynamically Retrieve them, and configure the webpage. It is worth noting that multiple tags must be added to multiple htmlmeta and then added to the header.
Original path: http://hi.baidu.com/lieqer/blog/item/b67cef829e019392f603a60b.html