Go4Expert

Go4Expert (http://www.go4expert.com/)
-   ASP (http://www.go4expert.com/forums/asp/)
-   -   meta tags (http://www.go4expert.com/forums/meta-tags-t14419/)

stevejhon 7Oct2008 15:55

meta tags
 
Hi,

i have articles uploaded from the admin side.in my website a short description uploaded from admin only wil appear for visitors and full article wil display for users and members.i am planning to display the articles in a datalist.My problem is, this articles need to come in the search engines when they search for the key words.i have little idea about meta description , keywords and all.How i can programatically set the meta key words for each article.so that wen somebody search in the search engines, they wil get redirected to the corresponding page in the datalist and corresponding article in that page.how i can accomplish this?

shazzmerc 14Oct2008 12:36

Re: meta tags
 
Hi Steve,
I have Suggest this simple code for your requirement.please put the following code in your page load event.
Code:

          // Render: <meta name="description" content="value" />           
                        HtmlMeta meta = new HtmlMeta();
                          meta.Name = "description";
                          meta.Content = value;
                          head.Controls.Add(meta);

            // Render: <meta name="keywords" content="value" />
                            HtmlMeta meta = new HtmlMeta();
                                    meta.Name = "keywords";
                                    meta.Content = value;
                                    head.Controls.Add(meta);

Regards;
shazz


All times are GMT +5.5. The time now is 18:18.