1
我有問題:當我使用<%= ConfigurationManager.AppSettings["xxx"] %>
和<%$ AppSettings: xxx %>
。ConfigurationManager.AppSettings或只有AppSettings?
有時當我使用<%= ConfigurationManager.AppSettings["xxx "] %>
時,出現以下錯誤:「服務器標記不能包含<%...%>結構」。然後放一個<%$ AppSettings: xxx %>
它工作。
像這個例子: 錯誤:
<asp:Literal runat="server" ID="Literal9" Text="<%= ConfigurationManager.AppSettings["xxx"] %>"></asp:Literal>
工作:
<asp:Literal runat="server" ID="Literal9" Text='<%$ AppSettings: xxx %>'></asp:Literal>