473,787 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

create and read entry from web.config

I want to create one element in web.config file, but i don't know how..

Please teach me how to create and read the element from web.config.

Million Thanks.
Nov 18 '05 #1
2 3091
Web.config file is a convenient palce for storing constants,value s, keys etc.. Each folder in your web application can contain a seperate web.config file. when CLR reads any files from the folder, it checks the presence of web.config file and reads the configuration for it. Its very simple to read any key from the web.config file. for example insert a key called "name" between the appsetings tag in web.config file. following shows how

<configuration> <!-- application specific settings --><appSettings>< add key="name" value="Mr. grey" /></appSettings><sy stem.web
..
</system.web></configuration

now in your webform or windows form use the following statime to read the settings

ConfigurationSe ttings.AppSetti ngs("name"

-happy programmin

Nov 18 '05 #2
look up more information about

ConfigurationSe ttings.AppSetti ngs

R
"Grey" <er*****@i-cable.com> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
I want to create one element in web.config file, but i don't know how..

Please teach me how to create and read the element from web.config.

Million Thanks.
Nov 18 '05 #3

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

Similar topics

3
4934
by: Phil Schmidt | last post by:
I'm trying to make a custom entry widget, as in the code that follows. There are two problems I'm trying to fix: 1) I would like the widget to behave as myEntry.Escape() does now, except that it happens on loss of focus, not when pressing Esc. 2) TABbing between multiple entry fields does undesired things with the selection, and with cursor placement. Can anyone offer any suggestions for how to fix this? I'm attemting to
1
1629
by: VK | last post by:
Hi! Can entry widget be scrolled? VK TypeError: xview() takes exactly 2 arguments (4 given) Code:
4
41074
by: ferg | last post by:
I've checked all the FAQs and help - spent a couple of hours on this now and it's really bugging me. I've got Moin 1.3.5 installed on IIS 5.0. I can view and edit pages without any problems, but cannot create new pages - either trough the GUI, or by creating a new WikiName and clicking on it. I'm stumped as to whether this is a Moin ACL problem (played around a lot with this, but to no avail) or perhaps an IIS config problem (though...
2
15830
by: Vicky via DotNetMonster.com | last post by:
Hi, Could anyone help me with some info how to create app.config file. I need to put code of directory info in there, Thank you very much! DirectoryInfo di = new DirectoryInfo("C:\\Vicky Development\\FundExplorer\\ Index\\Copy of IntlIndex"); --------------------------------------------------------------------- I know in app.config may like below ---------------------------------------------------------------------
6
3055
by: Daniel Caetano | last post by:
I have the main project that where is my app.config. I have a project dll called Data, that must to read from the app.config that belongs the main project a string connection. When i debug thats returns null. How can i read my connection string. I´d like a sample or a link that i could download it. Thanks
7
3351
by: Bob | last post by:
It's great that VS.NET makes it so effortless to add a web reference to a web service. The problem is, I haven't figured out a way to configure the URLs (or simply switch the references to another web reference) easily when I move my app from development, to staging, to production, as I have corresponding environments for the web services too. So far what I have done is copying the Reference.cs file out and creating a separate class by...
1
1507
by: James Johnston | last post by:
I've never written a Python program before and I'm trying to read a config file with file path/names (eg. c:\\python24\\*.dll, ... *.exe) to create an output file of filename + md5 values. I'm confused. I'm trying to learn how to use Wing IDE and step through the Stack Data. It seems to be working but on the for fn in filelist: data = file(fn,'rb').read() I get a
9
4273
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. Is it programatically possible in VB.NET to read the contents of web.config's <customErrorselement? I looked at using ConfigurationSettings.AppSettings, but that doesn't work. I need to read the value of redirect from the error statusCode 404. My web.config looks like this: <customErrors mode="RemoteOnly" defaultRedirect="Error.aspx"> <error statusCode="404" redirect="Error404.aspx" /> </customErrors>
3
2021
by: ecpbm765 | last post by:
Hey, I am helping to develop a project that displays images based on user input. One possible way of implementing this is via a widget that when it is run, would read in the users input from an input text field (probably from a blog), and replace it with the HTML that would display those images. This is more a proof of concept, so really all I am wondering is if there is a good way in Python to read in the text the user has typed and...
0
9497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8993
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
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 we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.