473,395 Members | 1,584 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,395 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 1536
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"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.