Sheritlw
asked on
ConfigurationManager is Not Declared????
I have been trying to get my connectionstring from the web.config file and both methods I have tried give errors.
I have imported the System.Configuration but I keep getting ConfigurationManager not declared.
I also tried using ConfigurationSettings.apps ettings and get this is obsolete.
What am I doing wrong???
Thanks
I have imported the System.Configuration but I keep getting ConfigurationManager not declared.
I also tried using ConfigurationSettings.apps
What am I doing wrong???
Thanks
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Data
Imports System.Configuration
Imports System.Data.Common
Imports System.Data.SqlClient
Imports System.Data.OleDb
Imports System.Data.Odbc
Imports System.IO
Namespace ApplicationFramework.DataAccessLayer
Public NotInheritable Class DBManager
Inherits DBManagerBase
Public Sub OpenConnection()
ConnectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
' ConnectionString = ConfigurationSettings.AppSettings("ConnectionString").ToString
MyBase.Open(ConnectionString)
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER