Yan Susanto
Yan Susanto

Reputation: 353

How to use WebConfiguratonManager?

I am new at ASP.net and VB.net. I am learning from the book "Beginning ASP.Net 3.5 in VB 2008"

The book is using Web.config and when I call it with

Private Conn As String = WebConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString

There is error saying:

Name WebConfigurationManager is not declared.

Is WebConfigurationManager a function?

Upvotes: 1

Views: 337

Answers (1)

Umair Noor
Umair Noor

Reputation: 442

You probably forgot:

System.Web.Configuration;

in a library.

Upvotes: 2

Related Questions