Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4124770
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:46:57+00:00 2026-05-20T23:46:57+00:00

I have question: when I to use <%= ConfigurationManager.AppSettings[xxx] %> and <%$ AppSettings: xxx

  • 0

I have question: when I to use <%= ConfigurationManager.AppSettings["xxx"] %> and <%$ AppSettings: xxx %>.

Sometimes when I use <%= ConfigurationManager.AppSettings["xxx "] %> a I got the following error: “Server tags cannot contain <% … %> constructs”. Then a put <%$ AppSettings: xxx %> and it works.

Like this example:
Error:

<asp:Literal runat="server" ID="Literal9" Text="<%= ConfigurationManager.AppSettings["xxx"] %>"></asp:Literal>

Working:

<asp:Literal runat="server" ID="Literal9" Text='<%$ AppSettings: xxx %>'></asp:Literal>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:46:58+00:00Added an answer on May 20, 2026 at 11:46 pm

    The error occurs not because you’re switching between ConfigurationManager.AppSettings and AppSettings, but because of the symbol used after <%. You can’t have code rendering markup inside a server-side control that renders markup. The second way works because it evaluates the expression prior to server-side control render.

    My preference is to always use ConfigurationManager.AppSettings, because it’s more clear as to what the code is accessing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have question from programming pearls problem is following show how to use Lomuto's
I have question regarding the use of function parameters. In the past I have
I have a question regarding use of FFT. Using function getBand(int i) with Minim
i have an question how to use an alias column at the where/having clause.
I have a question about the use of multidimensional std::intializer_list in C++. I have
i have a question how to use an alias from a select query: $timecheck
I have a question about the use of data structures such as ArrayLists in
I have a question about making static libraries that use other static libraries. I
I have a question that can I use AS400ConnectionPool in Spring if then pls
I have a question regarding VB.net and the use of rsData connections to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.