Clicky

Hi Experts
i created a web part that retrieve data from database from another server and i deployee this web part in my local sharepoint. it was deployed sucssesful, but when i refresh the page it gave me the following message

The ConnectionString property has not been initialized.
the connection string that i am using
 
 ConnectionString = System.Configuration.ConfigurationManager.AppSettings["AttendanceConnectionString"];                             
1: 

Select allOpen in new window

         
i dont know how to solve this problem?

asked 12/14/2011 06:11

AZZA-KHAMEES's gravatar image

AZZA-KHAMEES ♦♦


1 Answers:
Usually, a connection string is acquired from the config file (in .NET) in this manner:

1:
string ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["AttendanceConnectionString"].ConnectionString;


Provided you put your connection string in the <connectionStrings> section of the config file.
link

answered

kaufmed's gravatar image

kaufmed

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×17

Asked: 12/14/2011 06:11

Seen: 221 times

Last updated: 12/14/2011 08:30