|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Role of the web.config file with UserControls [2.0]Most of the configuration information for a web application exist in the
web.config file. We're planning on writing a set of compiled UserControls that could be used by "any" web site. Of course, we're not going to be aware what information has already been added to the web site's web.config file, so are a little apprehensive about relying upon it in case there are any "conflicts". What should we do...? Thanks Griff Use a custom configuration handler. That way in the web.config you can have
your own little section: <myCompany> <Web imagePath="images/"> <Cache Timeout="323" Type="Memory" /> ...whatever else you need </Web> <myCompany> This way you avoid any potential conflict and can creating a strongly type configuration class. This is how you did it in 1.x: http://openmymind.net/index.aspx?documentId=5 you can still use this approach, but it's stupidly easier in 2.0: http://msdn2.microsoft.com/en-us/library/system.configuration.configurationsection.aspx and the countless of hits google will give you.. Karl Show quoteHide quote "Griff" <howl***@the.moon> wrote in message news:evyOslU4GHA.1496@TK2MSFTNGP05.phx.gbl... > Most of the configuration information for a web application exist in the > web.config file. > > We're planning on writing a set of compiled UserControls that could be > used by "any" web site. Of course, we're not going to be aware what > information has already been added to the web site's web.config file, so > are a little apprehensive about relying upon it in case there are any > "conflicts". What should we do...? > > Thanks > > Griff >
Using ASP.NET 2.0's ImageMap Control
GridView Update Not Working missing ellipsis in editor asp.net 2 report problem with 3-tier design Treeview Styles Aren't working How to hide the "Edit" link in DetailsView via code? White strip showing up between two imagemaps ASP code UserControls in a different directory ASP.Net 2.0 Validation Groups & IValidator Controls. |
|||||||||||||||||||||||