Most time you need to use a property in your class project. .Net has made it very easy.

For example you have MyDemoWeb Project and a class library called MyClass.

Create a app.config file in MyClass, add setting in Properties, choose Application Scope.

Don’t View Code otherwise it will generate a setting.settings.cs file. Go to the properties of Settings.settings, replace “PublicSettingsSingleFileGenerator” in custom tools. Build the project.

Now open web.config & app.config,


        <sectionGroup name=”applicationSettings” type=”System.Configuration.ApplicationSettingsGroup, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089″ >
            <section name=”MyClass.Properties.Settings” type=”System.Configuration.ClientSettingsSection, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089″ requirePermission=”false” />

in your <configSections> section of your web.config

and   put following in <configuration> of your web.config

      <setting name=”FullName” serializeAs=”String”>
        <value>Ken Zheng</value>

Then in your code write l

blProperty.Text = MyClass.Properties.Settings.Default.FullName;

You Can download example code from