1
<title><%=MyLib.data.GetMetaTitle()%></title>
這不
<meta name="description" content="<%=MyLib.data.GetMetaDescription()%>" >
返回:
<meta name="description" content="<%=MyLib.data.GetMetaDescription()%>" >
這類作品
的<meta name="description" content="\"<%=MyLib.data.GetMetaDescription()%>"\" >
返回:
<meta name="description" content="\"Meta Description"\" >
SO - 我可以在C#功能引號外面跑,但我不能得到的數據在頭引號內出現。
嘗試使用單引號。例如,我知道在執行'<%# Eval %>'時,使用雙引號會導致頁面發生錯誤。 – Santi
注意:請編輯帖子,標籤爲您正在使用的框架 - 可能ASP.Net(與ASP.Net MVC/Razor) –
沒有...也嘗試過。單引號不會改變行爲。 –