473,602 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Configur ation.Configura tionSettings.Ap pSettings.Get(. ..)

RSH
Hi,

I have a situation where I am attempting to print the contents of an
AppSettings property in the aspx file of my website. Basically here is the
code I am using:
<% Response.Write( "Email:" &
System.Configur ation.Configura tionSettings.Ap pSettings.Get(" WebMasterEmail" )
) %>
The Email part of the string prints out but not the WebMasterEmail property
of the AppSettings.

What am I missing???

Thanks,
Ron
May 3 '06 #1
4 2355
I tried you code and it prints okay here.
Is WebMasterEmail case sensitive?
Is it correct in your web.config ??

Check you web.config file.

SA

"RSH" <wa************ *@yahoo.com> wrote in message
news:e5******** ******@TK2MSFTN GP05.phx.gbl...
Hi,

I have a situation where I am attempting to print the contents of an
AppSettings property in the aspx file of my website. Basically here is
the
code I am using:
<% Response.Write( "Email:" &
System.Configur ation.Configura tionSettings.Ap pSettings.Get(" WebMasterEmail" )
) %>
The Email part of the string prints out but not the WebMasterEmail
property
of the AppSettings.

What am I missing???

Thanks,
Ron

May 3 '06 #2
RSH,
in C#,

System.Configur ation.Configura tionSettings.Ap pSettings["WebMasterEmail "]

--with square brackets.

This assumes ASP.NET 1.1 and that your element looks like so:

<appSettings>
<add key="WebMasterE mail" value="whatever itis" />
</appSettings>

Note that **everything** is case-sensitive!
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"RSH" wrote:
Hi,

I have a situation where I am attempting to print the contents of an
AppSettings property in the aspx file of my website. Basically here is the
code I am using:
<% Response.Write( "Email:" &
System.Configur ation.Configura tionSettings.Ap pSettings.Get(" WebMasterEmail" )
) %>
The Email part of the string prints out but not the WebMasterEmail property
of the AppSettings.

What am I missing???

Thanks,
Ron

May 3 '06 #3
Goto ASP.NET group....

I tried you code and it prints okay here.
Is WebMasterEmail case sensitive?
Is it correct in your web.config ??

Check you web.config file.

SA
"RSH" <wa************ *@yahoo.com> wrote in message
news:e5******** ******@TK2MSFTN GP05.phx.gbl...
Hi,

I have a situation where I am attempting to print the contents of an
AppSettings property in the aspx file of my website. Basically here is
the
code I am using:
<% Response.Write( "Email:" &
System.Configur ation.Configura tionSettings.Ap pSettings.Get(" WebMasterEmail" )
) %>
The Email part of the string prints out but not the WebMasterEmail
property
of the AppSettings.

What am I missing???

Thanks,
Ron

May 3 '06 #4
It looks like he is using VB.NET and asking a Web Question in C# group.
???

SA

"RSH" <wa************ *@yahoo.com> wrote in message
news:e5******** ******@TK2MSFTN GP05.phx.gbl...
Hi,

I have a situation where I am attempting to print the contents of an
AppSettings property in the aspx file of my website. Basically here is
the
code I am using:
<% Response.Write( "Email:" &
System.Configur ation.Configura tionSettings.Ap pSettings.Get(" WebMasterEmail" )
) %>
The Email part of the string prints out but not the WebMasterEmail
property
of the AppSettings.

What am I missing???

Thanks,
Ron

May 3 '06 #5

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

Similar topics

0
263
by: runningdog | last post by:
HI, Sorry if this is a bit long winded I'm working on a suite of winapps that need to use two levels of configuration data; application level and solution level. I found a reference on MSDN that suggested that app.config file can import data from another file at runtime. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/tdlg_ch4.asp So I created a solution and added app.config and user.config as follows
1
2153
by: Jason Huang | last post by:
Hi, I've created an ODBC connection with SQL Server 2000, for conneting to MyDatabase. In the process of building that ODBC connection, I test the connection and fine with no problem. However, in my C#.Net project, I add a CrystalReport MyReport to my project, then I test running MyReport, it will pop out a small box asking me to key in DataBase, Username and Password again. What do I need to do to let MyReport running without keying...
6
6096
by: Tony | last post by:
Dear All, When I run an example program on the http://www.dotnetjunkies.com/quickstart/util/srcview.aspx?path=/quickstart/aspplus/samples/webforms/data/datagrid1.src&file=VB\datagrid1.aspx&font=3 I received an error message: "The ConnectionString property has not been initialized.
1
4332
by: Patrick | last post by:
When Tracing in ASP.NET, the IIS process (on IIs5.1) is locking on the Trace file, and I can't read the trace file without restarting the IIS: Even the following does NOT work (how could I fix this??): System.Diagnostics.Trace.WriteLine(System.DateTime.Now.ToLongTimeString()+ "--" + dirException.ToString()); System.Diagnostics.Trace.Flush(); ((System.Diagnostics.TraceListener) System.Diagnostics.Trace.Listeners).Close();
2
1435
by: RSH | last post by:
Hi, I have a situation where I am attempting to print the contents of an AppSettings property in the aspx file of my website. Basically here is the code I am using: <% Response.Write("Email:" & System.Configuration.ConfigurationSettings.AppSettings.Get("WebMasterEmail") ) %> The Email part of the string prints out but not the WebMasterEmail property of the AppSettings.
5
5018
by: Joe Reiss | last post by:
Using vs2005, C# I'm writing some code to settings out of my app.config file. I seemed to be missing many fields from System.Configuration. For example System.Configuration.Configuration will not compile. Why am I missing so many methods from this namespace? Thanks, Joe
3
5803
by: Jyothi Kumar | last post by:
Hi, my project is a migrated project from VS 2003 to VS 2005, in this project I used System.Configuration.ConfigurationSettings.AppSettings, now in VS 2005 it is giving a warning Message like: ConfigurationSettings.AppSettings is Obsolete, please replace with ConfigurationManager.AppSettings, but Iam unable to find this ConfigurationManager class in System.Configuration namespace, but if I add System.Configuration.dll as reference to my project...
2
5323
by: mark4asp | last post by:
In trying to get the C# conversion code for Head First Design Patterns to work I came accross a number of warnings. e.g. Warning Number: 10 Description: 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings' E:\code\HeadFirstDesignPatternsInCSharp\Decorator.Starbuzz\Expresso.cs Line: 31
2
2718
by: pantagruel | last post by:
Hi, I have a Visual studio 2005 project that runs as a Windows Service. In it I have declared that I am using System.Configuration. I have set one application setting for the service using the settings panel. When I try to do the following;
0
7920
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
8404
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6730
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...
0
5440
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
3900
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
2418
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
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
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.