Re: Component Creation
From: Matjaz Ladava (matjaz_at__nospam_ladava.com)
Date: 05/24/03
- Next message: Bill Todd: "Error in Global.asax"
- Previous message: Roshawn: "Component Creation"
- In reply to: Roshawn: "Component Creation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 24 May 2003 16:33:56 +0200
Yes, your library will automaticaly use web.config of asp.net application.
you can try this. Simply create ASP.NET application, reference a library and
use ConfigurationSettings.AppSetting["youconnectstringname"] in your
library. It should contain value from your master wb.config file.
In asp.net web.config place yourconnectstringname unser <appSettings>
section
Regards
Matjaz Ladava
"Roshawn" <abreount316@msn.com> wrote in message
news:13c901c321e8$91ddd730$a601280a@phx.gbl...
> Hi ASP.NETters,
>
> I am designing a class library to use with my ASP.NET
> application. This library uses various tables in a
> database created with MSDE 2000. The connection string
> is contained within the library. However, I've seen
> examples in which the connection string is placed in the
> Web.config file.
>
> I'd like to create the class library so that it doesn't
> have to be recompiled should the connection string
> happens to change (for various reasons). How can I
> accomplish this? Can the library use the connection
> string stored in the Web.config file? If so, how?
>
> Thanks,
> Roshawn
- Next message: Bill Todd: "Error in Global.asax"
- Previous message: Roshawn: "Component Creation"
- In reply to: Roshawn: "Component Creation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|