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

  • Home
  • SEARCH
  • 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 5943633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:25:24+00:00 2026-05-22T16:25:24+00:00

Web.Config <appSettings> <add key=minimumValue value=0 /> <add key=maximumValue value=1000 /> </appSettings> Web Form <asp:RangeValidator

  • 0

Web.Config

<appSettings>
   <add key="minimumValue" value="0" />
   <add key="maximumValue" value="1000" />
</appSettings>

Web Form

<asp:RangeValidator ID="RangeValidator1" runat="server" Display="None" ErrorMessage="Error message." ControlToValidate="TextBox" MinimumValue="<%$ appSettings:minimumValue %>" MaximumValue="<%$ appSettings:maximumValue %>" Type="Integer" />

App settings in Web.config file are read-only after deployment process.
So I put these settings to ServiceDefinition.csdef and ServiceConfiguration.cscfg files and I can read them via code-behind:

RoleEnvironment.GetConfigurationSettingValue

Does it exists declarative way for this?

Like <%$ appSettings:maximumValue %> for app setting in Web.Config.

  • 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-22T16:25:25+00:00Added an answer on May 22, 2026 at 4:25 pm

    You can get it in this way:

    MinimumValue='<%# System.Configuration.ConfigurationManager.AppSettings["minimumValue"] %>'
    

    And add this, as it will bind the value to your property:

     protected void Page_PreRenderComplete(object sender, EventArgs e)
    {
        DataBind();
    }
    

    For Details on how this works, check this thread: how-to-set-contol-property-in-asp-net

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

Sidebar

Related Questions

How can I change a key's value in web.config which is defined between appSettings
Currently my web.config has this: <appSettings> <add key=UserName /> <add key=DBServer /> <add key=DBUserName
I need to do something like this: <appSettings> <add key=Three value=NumberThree/> </appSettings> <appSettings configSource=One.config/>
In my Web.config file have the following setup: <add key=ClientMail value=ridermansb@bindsolution.com/> In my file
I've got an ASP.Net app in which my AppSettings node from the Web.Config xml
ASP.NET 3.5 Classes throughout our solution referenced ConfigurationManater.AppSettings[] to get appSettings (from web.config). We
How can I inject the value of an appSettings entry (from app.config or web.config)
I've trying to access an appsettings key value in my vb.net 2.0 web application.
I have my web config as follows <?xml version=1.0?> <configuration> <appSettings/> <connectionStrings> <add name=MySqlConnection
ASP.NET 4 I've used RSA key encryption for connection strings in web.config on my

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.