Asp.net 是否在aspx页面上打印configurationmanager.appsettings变量?

Asp.net 是否在aspx页面上打印configurationmanager.appsettings变量?,asp.net,Asp.net,我似乎无法将configurationmanager.appsettings变量打印到aspx页面。因此,在我的index.aspx文件中,我有以下代码行: <%# (string) ConfigurationManager.AppSettings["myvariable"] %> 然后它出现了 如何将配置变量直接打印到index.aspx,而无需隐藏代码? textbox.Text = (string) ConfigurationManager.AppSettings["myva

我似乎无法将configurationmanager.appsettings变量打印到aspx页面。因此,在我的index.aspx文件中,我有以下代码行:

<%# (string) ConfigurationManager.AppSettings["myvariable"] %>
然后它出现了

如何将配置变量直接打印到index.aspx,而无需隐藏代码?


textbox.Text = (string) ConfigurationManager.AppSettings["myvariable"];
<%= ConfigurationManager.AppSettings["myvariable"] %>
<asp:Literal runat="server" Text="<%$ appSettings:myvariable%>" />