Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7754867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:25:19+00:00 2026-06-01T12:25:19+00:00

Hi every one I am getting the following error: The name ‘ConfigurationManager’ does not

  • 0

Hi every one I am getting the following error: “The name ‘ConfigurationManager’ does not exist in the current context”

// namespaces
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
using System.IO;

namespace Database1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        public static string GetConnectionString(string strConnection)
        {
            //variable to hold our connection string for returning it

            string strReturn = "";
            //check to see if the user provided a connection string name
            //this is for if your application has more than one connection string

            if (!string.IsNullOrEmpty(strConnection)) //a connection string name was        
            {
                //get the connection string by the name provided
                strReturn = ConfigurationManager.ConnectionStrings[strConnection].ConnectionString;

            }
            else //no connection string name was provided
            {
                //get the default connection string
                strReturn = ConfigurationManager.ConnectionStrings["YourConnectionName"].ConnectionString;
            }
            //return the connection string to the calling method
            return strReturn;
        }

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:25:20+00:00Added an answer on June 1, 2026 at 12:25 pm

    Which version of .NET Framework and Visual Studio are you using?

    ConfigurationManager is only available in .NET 2 and above. If you are using .NET Framework 1.x and Visual Studio 2002/2003, you won’t be able to use this class at all.

    http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx

    Click “Other versions” link in the top of this page and you will see all versions it supports.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi every one I have these classe @Entity @Table(name = login, uniqueConstraints={@UniqueConstraint(columnNames={username_fk})}) public class
hii every one, following is my code which displays 4 panel one is at
I am getting the following error from C++ Builder 2009's linker Unresolved external '__fastcall
I'm getting the error when attempting to add to a client-side EntitySet. The following
I am getting the following error from Apache: [Sat Mar 19 23:10:50 2011] [warn]
i am getting the following error: Incorrect syntax near 'cast', expected 'AS'. on this
Hey everyone, I am trying to run the following program, but am getting a
Good Day Everyone... I’m getting an unexpected WCF error complaining of Known Types which
every one i m new with ASP .net and I dont know how to
Hai every one I am developing an windows application in which i have to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.