473,507 Members | 13,917 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

connString

How can i use a connString out of the web.config file in another page?
Feb 2 '06 #1
4 1326
Can you explain what you mean because everything in the web.config should be
accessible from all places that are using the configuration namespace.

" Ashe Sjedic" <to*******@doughpddu.com> wrote in message
news:tM******************************@comcast.com. ..
How can i use a connString out of the web.config file in another page?

Feb 2 '06 #2
that's what I needed to know. How do I accesss the configuration namespace.
from a page or a class?

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:eK**************@tk2msftngp13.phx.gbl...
Can you explain what you mean because everything in the web.config should
be accessible from all places that are using the configuration namespace.

" Ashe Sjedic" <to*******@doughpddu.com> wrote in message
news:tM******************************@comcast.com. ..
How can i use a connString out of the web.config file in another page?


Feb 2 '06 #3
In your page,

Dim dbconn As String =
ConfigurationSettings.AppSettings("myDBConnStringK eyName")

Where "myDBConnStringKeyName" is the name of the setting key you created in
your web.config's <configuration>.

HTH

Al

" Ashe Sjedic" <to*******@doughpddu.com> wrote in message
news:4e********************@comcast.com...
that's what I needed to know. How do I accesss the configuration
namespace. from a page or a class?

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:eK**************@tk2msftngp13.phx.gbl...
Can you explain what you mean because everything in the web.config should
be accessible from all places that are using the configuration namespace.

" Ashe Sjedic" <to*******@doughpddu.com> wrote in message
news:tM******************************@comcast.com. ..
How can i use a connString out of the web.config file in another page?



Feb 2 '06 #4
And to add to Al's advice then add
<add key="myDBConnStringKeyName"
value="server=(local);database=urdatabase;integrat ed security=true;" />
to your web.config
Patrick

"Alec MacLean" <al**@NOSPAM.imperialroad.co.uk> wrote in message
news:em**************@TK2MSFTNGP10.phx.gbl...
In your page,

Dim dbconn As String =
ConfigurationSettings.AppSettings("myDBConnStringK eyName")

Where "myDBConnStringKeyName" is the name of the setting key you created in your web.config's <configuration>.

HTH

Al

" Ashe Sjedic" <to*******@doughpddu.com> wrote in message
news:4e********************@comcast.com...
that's what I needed to know. How do I accesss the configuration
namespace. from a page or a class?

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:eK**************@tk2msftngp13.phx.gbl...
Can you explain what you mean because everything in the web.config should be accessible from all places that are using the configuration namespace.
" Ashe Sjedic" <to*******@doughpddu.com> wrote in message
news:tM******************************@comcast.com. ..
How can i use a connString out of the web.config file in another page?



Feb 3 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2797
by: janet | last post by:
hI ... I am newbie to ASP ... i am trying to write a code to accept login and passwor from a user and verify through a table created in MySQL. I am just trying to write a code on my own...
9
1818
by: janet | last post by:
hi ... When i click to the submit button, i want to insert value from the a text box to the mysql db. But when i enter text in the text box nothing happens on clickign the submit button. can...
4
2858
by: janet | last post by:
hey hi... this in in continuation to my other post. i am trying hard and cannot find out whats the problem. i am getting crazy...please asp experts ...do resolve the problem...its something very...
0
1722
by: Giulio Santorini | last post by:
Hi, I've got two drop down list controls. When I select a value from the first one I fill the second one. And when I select a value from the second one I would like to fill another control. But...
1
1863
DBF
by: Klaus Kaiser Apolinário | last post by:
Guys, I have a DBF ( :-S ) pseud-database here, and I need to access this dbf with C#, how I can make this??? Klaus Kaiser Apolinário COL
1
8446
by: Craig | last post by:
I have added a 'Textboxes (A)' to my UI installer project along with a custom action to pass the value back to a class I've written to override the void Install function. As long as the text is...
3
1378
by: Balaji Kannan | last post by:
Hi, In dot net during component development i have used some member variables in the class file. Inside the class i have used the member declaration and the instant handling in the following...
7
1533
by: Cemal Karademir | last post by:
Hi, I'm workin on a small Login page/program with asp.net. It uses an MS-Access database that looks like this: USERID | NAME | PASSWORD _________________________________ 1 ...
37
1709
by: Dan | last post by:
Hi, i develop webapplications with asp.net and vb.net. Is there any good reason why i should switch to (and learning) C#? Thanks for the pro's and contra's. Dan
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.