为数据库sql添加元标记 [英] Adding meta tag for database sql
问题描述
嗨专家
我正在使用我们在核心asp创建的CMS系统; .net c#,现在客户希望在每个页面上添加元标记由后端系统或手动创建
客户端希望将元信息(元标题。关键字desc)保存在数据库中并获取相应的页面
不同的页面有不同的ID和内容也即将到来的数据库..
这可能吗?
Hi Experts
I am having CMS system which we created in core asp;.net c# , now client want to add meta tag on the each page which is created by backend system or manually
client want to meta information( meta title. keyword desc ) to be saved on datbase and fetch respective pages
different page has different id and content is also coming database ..
Can this possible ??
推荐答案
对于关键字,您可以尝试以下方法:
For the keywords you can try the following:
System.Web.UI.HtmlControls.HtmlMeta pageKeyWords = new HtmlMeta();
pageKeyWords.Name = "keywords";
pageKeyWords.Content = "Keyword list from databasefield or function";
Page.Header.Controls.Add(pageKeyWords);
然后只需将Content属性设置为您想要的任何值它是。对于标题,你可以使用
and then just set the Content property to whatever value you want it to be. For the title you can use
Page.Header.Title
希望这会有所帮助。
Hope this helps.
这篇关于为数据库sql添加元标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!