Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Getting the connnectionString in an MVC2 program, that's stored in the Web.Config

Posted on 2010-09-22
2
Medium Priority
?
280 Views
Last Modified: 2012-05-10
I have set the connnectionString in an MVC2 ASP.NET Web.Config file, but need to insert it into an SqlConnection object. ow do I get it from the Web Config?

I use C#.

Thanks,
newbieweb
0
Comment
Question by:newbieweb
2 Comments
 
LVL 33

Accepted Solution

by:
jppinto earned 2000 total points
ID: 33736922
0
 

Author Closing Comment

by:newbieweb
ID: 33738911
Thanks.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question