如果有人在我网站的产品页面上,我想覆盖元描述标记。C#替换这些标记之间的所有内容
<meta name="description" content=" " />
我使用的CMS已在此代码预渲染它的页面模板的方法:
this.ltlTags.Text = this.HeaderTags;
这种填充与meta标签,CSS标签,脚本代码和所有的头。
我想说的是这样的:
this.ltlTags.Text = this.HeaderTags.Replace(
"everything inside the content attribute of the meta tag", "with this text");
在C#中有什么办法,我可以做到这一点?
我不确定你提供了足够的信息来回答这个问题。 'this.HeaderTags'是什么?如果它包含多个标签,它们是如何分隔的等等? – 2011-04-14 14:57:29