473,287 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

config file and custom XML Tags

Dear all,

Let say that I have developped a funcionnal library that I distribute for use.
That library can be integrated in a project by referencing it and then use
it by calling function and setting properties. So far so good.

I would like that some function behaviour can be customized withing config
file through custom predifined XML tags.What is the way to be able to
configure some property of that libarry inside config file within custom XMl
tags and then be able to read them back.

In a similar way when configuing an asp pahe withinh HTML editor. You are
able to get intelisense content of particula library tags

thnaks for your help

reagrds
serge
May 19 '06 #1
3 1528
You can add custom configration keys in your config file by using <add key=""
value="" /> elements and you can read it in code by using
System.configration.configrationsettings.appsettin gs("key"). If you want
intellisense for your config file .. you have to first create schema file for
that config file and then open config file in visual studio, go to properties
window and provide file path of that schema file in targetschema property.

"serge calderara" wrote:
Dear all,

Let say that I have developped a funcionnal library that I distribute for use.
That library can be integrated in a project by referencing it and then use
it by calling function and setting properties. So far so good.

I would like that some function behaviour can be customized withing config
file through custom predifined XML tags.What is the way to be able to
configure some property of that libarry inside config file within custom XMl
tags and then be able to read them back.

In a similar way when configuing an asp pahe withinh HTML editor. You are
able to get intelisense content of particula library tags

thnaks for your help

reagrds
serge

May 21 '06 #2
Serge,

If you want completely custom sections of the config you can use the
configsettings element (see
http://msdn2.microsoft.com/en-US/library/ms228256.aspx) to specify how that
section should be parsed. In your library you can then define a class to
parse the xml.

"Altaf Al-Amin Najwani" wrote:
You can add custom configration keys in your config file by using <add key=""
value="" /> elements and you can read it in code by using
System.configration.configrationsettings.appsettin gs("key"). If you want
intellisense for your config file .. you have to first create schema file for
that config file and then open config file in visual studio, go to properties
window and provide file path of that schema file in targetschema property.

"serge calderara" wrote:
Dear all,

Let say that I have developped a funcionnal library that I distribute for use.
That library can be integrated in a project by referencing it and then use
it by calling function and setting properties. So far so good.

I would like that some function behaviour can be customized withing config
file through custom predifined XML tags.What is the way to be able to
configure some property of that libarry inside config file within custom XMl
tags and then be able to read them back.

In a similar way when configuing an asp pahe withinh HTML editor. You are
able to get intelisense content of particula library tags

thnaks for your help

reagrds
serge

May 25 '06 #3
Is there any good link for sample shema file to reach this goal ?

"Altaf Al-Amin Najwani" wrote:
You can add custom configration keys in your config file by using <add key=""
value="" /> elements and you can read it in code by using
System.configration.configrationsettings.appsettin gs("key"). If you want
intellisense for your config file .. you have to first create schema file for
that config file and then open config file in visual studio, go to properties
window and provide file path of that schema file in targetschema property.

"serge calderara" wrote:
Dear all,

Let say that I have developped a funcionnal library that I distribute for use.
That library can be integrated in a project by referencing it and then use
it by calling function and setting properties. So far so good.

I would like that some function behaviour can be customized withing config
file through custom predifined XML tags.What is the way to be able to
configure some property of that libarry inside config file within custom XMl
tags and then be able to read them back.

In a similar way when configuing an asp pahe withinh HTML editor. You are
able to get intelisense content of particula library tags

thnaks for your help

reagrds
serge

May 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Parag joshi | last post by:
hi, In the App.config file I have added my own custom tags. <section name="AdvancedSearch" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral,...
13
by: msuk | last post by:
All, I have a app.config which contains repeating tags as shown below: <filelist> <file> <filetype>xxx</filetype> <hex>yyyy</hex> </file>
0
by: Chance Hopkins | last post by:
Does anyone know how to get a custom httpHandler to fire for all applications in machine.config for an assembly in the GAC, without using seperate location tags? For instance, this works for a...
3
by: Krishnan | last post by:
Hi, Could anybody please let me know if I can have custom tags in Web.Config file just as we do for app.config? If yes, how? If no, how do we generally configure dynamic properties for an asp.net...
4
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
0
by: Adam Getchell | last post by:
I'm attempting to write a custom Authentication module using http://www.15seconds.com/Issue/020417.htm I looked at http://support.microsoft.com/default.aspx?scid=kb;EN-US;307996, but it doesn't...
2
by: Sam | last post by:
Inquiry? -------- I would like to authenticate all subdirectory via asp.net at Windows Server 2003 and IIS 6.0 but it prompt an error message as shown as below: Runtime Error? --------------...
16
by: Timm | last post by:
I'm trying to use ASP objects (basically formed and populated based on Web.Config settings) and I want to use them in a different non-asp program with minimal reprogramming. So, my question is how...
2
by: Luke Dalessandro | last post by:
I have an application with the following layout /root/ /root/Default.aspx /root/web.config /root/child/ /root/child/web.config web.config has a custom configuration section "testSection"...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.