Create Web.Config group

S

shapper

Hello,

Is it possible to create a custom Web.Config group?
I am creating various classes that need some parameters to be defined
by the user that uses these classes.

So i was thinking about placing that information on Web.Config.

Thanks,
Miguel
 
D

David R. Longnecker

Miguel-

Yeah, if you're using .NET 2.0 or higher, they're called config sections.

Scott wrote up a good article at http://aspnet.4guysfromrolla.com/articles/032807-1.aspx.

HTH.

-dl

--
David R. Longnecker
http://blog.tiredstudent.com

s> Hello,
s>
s> Is it possible to create a custom Web.Config group?
s> I am creating various classes that need some parameters to be defined
s> by the user that uses these classes.
s> So i was thinking about placing that information on Web.Config.
s>
s> Thanks,
s> Miguel
 
J

Juan T. Llibre

<configuration>
<configSections>
<sectionGroup name="NewSectionGroup">
<section name="NewSection"
type="System.Configuration.NameValueSectionHandler,System" />
</sectionGroup>
</configSections>
<NewSectionGroup>
<NewSection>
<add key="key1" value="value1" /> <add key="key2" value="value2" />
</NewSection>
</NewSectionGroup>
</configuration>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top