我的页面有一个meta描述标签,我以编程方式更改的meta描述标签的内容是这样编程改变在C#中的meta描述
<meta name="description" content=<%=getmeta()%> />
的getmeta功能类似以下
public string getmeta()
{
return "this is a meta description's content";
}
当我页面呈现它呈现这样毫无意义的meta元素
<meta name="description" content="this" is="" a="" meta="" description's="" content="" >
什么是导致这个,我错过了什么?
难道真的编译?在getmeta函数的return语句结尾处有多余的“)”。 – 2015-02-09 10:18:22
一切都在这里投票!即使正确的答案! :) – 2015-02-09 10:47:34
@DaveBecker哪个答案是正确的? – DavidG 2015-02-09 10:52:39