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 3334174
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:52:34+00:00 2026-05-17T23:52:34+00:00

I have an ASP.NET site which uses a 3rd party activeX control. I have

  • 0

I have an ASP.NET site which uses a 3rd party activeX control. I have to pass a few parameters to the OBJECT tag in the HTML page. If i hardcode these parameters into the HTML everything works.

I would like to place the parameters in my web.config with app settings “key/value” pairs.

My problem is i cannot read the app key setting in the HTML markup to succesfully pass them in as parameters. I can read them fine from server side code behind.

What’s the correct way to read these settings in the client side HTML markup ?

Thanks

  • 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-17T23:52:34+00:00Added an answer on May 17, 2026 at 11:52 pm

    In addition to using <%=ConfigurationManager.AppSettings["MyAttribute"]%>, as others have noted, you can also use expression builders. The syntax is a little different. Instead of <%=...%> you use <%$ AppSettings: MyAttribute %>, like so:

    <object id="myObjectID attr="<%$ AppSettings: MyAttribute %>" ...>
    

    If you are just dumping an appSettings value directly into static HTML (as I presume you are in this example), these two approaches are identical for all practical purposes.

    What is nice about expression builders, though, is that you can use them to declaratively assign appSettings values to Web control properties, something you cannot do with the <%=...%> syntax. That is, with expression builders you can do something like:

    <asp:Label runat="server" ... Text="<%$ AppSettings: MyAttribute %>" />
    

    Whereas you could not do:

    <asp:Label runat="server" ... Text="<%=ConfigurationManager.AppSettings["MyAttribute"]%>" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

simple question... Given I have an ASP.NET site, which uses a [custom] RoleProvider, Is
We have a legacy ASP.NET site which uses the encryption methods here: http://www.codekeep.net/snippets/af1cd375-059a-4175-93d7-25eea2c5c660.aspx When
I have an ASP.Net MVC intranet site which uses Windows Authentication to know who
I have an Asp.Net site which uses google SMTP to send emails.. its working
I have an ASP.Net site, in which I am using a ListView with a
I have an ASP.NET MVC web site. I have many actions which require authentication
i have part of Asp.NET 1.1 project. I work with remote site, which works
I have a Site.Master in my ASP.NET project which defines a HEAD section as
I have a site which is built in ASP.net and C#. Let's call it
I have an asp.net/C# app that uses subversion for source control. My app automatically

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.