PLEASE DO NOT MULTI-POST.
Answered in the csharp group.
http://www.lmgtfy.com/?q=Crosspost+v...roup+Etiquette
"Ele" <> wrote in message
news:4b83dad1$0$1129$. ..
> Hello,
>
> I have one solution containing two c# projects: one project builds a DLL
> that is used by the main project (the other project). In the web.config of
> the main project I added (in the appSettings section) the connectionString
> parameter, that I read to load my connection string (to SQL Server 2005).
>
> However, in the supporting project (the DLL), sometimes I need to connect
> to the database too. But I don't have the connection string there, and I
> don't want to duplicate it (in some constant inside the DLL). Sure, I can
> pass the connectionString each time I call a method/function in the DLL,
> but I think this is not a good way.
>
> So my question is: what is the best way to share the connectionString
> between the main project and the DLL?
>
> Thanks!
>
>
>