Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 15, 2011 08:10 PM by Anton Palyok
Member
4 Points
9 Posts
Jun 15, 2011 05:19 PM|LINK
I need to define a key like this in a web.config
<add key="P01" value="Nombre o Razón Social" />
Tks
C@riños C@rlos
All-Star
24182 Points
3719 Posts
Jun 15, 2011 06:09 PM|LINK
you have to define an appsetting section in the web.config and add it there
http://msdn.microsoft.com/en-us/library/ms228154.aspx
Contributor
2526 Points
404 Posts
Jun 15, 2011 08:10 PM|LINK
Hi,
Maybe you should to encode ampersand?
In web.config add this:
<configuration> <appSettings> <add key="P01" value="Nombre o Raz&oacute;n Social" /> </appSettings> </configuration>
In codebehind file access to this parameter:
string p01 = System.Configuration.ConfigurationManager.AppSettings["P01"];
And now variable p01 equals to "Nombre o Razón Social"
Does it what you need?
carinos.carl...
Member
4 Points
9 Posts
How to insert this <add key="P01" value="Nombre o Razón Social" /> in the Web.config
Jun 15, 2011 05:19 PM|LINK
I need to define a key like this in a web.config
<add key="P01" value="Nombre o Razón Social" />
Tks
C@riños C@rlos
Jeev
All-Star
24182 Points
3719 Posts
Re: How to insert this <add key="P01" value="Nombre o Razón Social" /> in the Web.config
Jun 15, 2011 06:09 PM|LINK
you have to define an appsetting section in the web.config and add it there
http://msdn.microsoft.com/en-us/library/ms228154.aspx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you get the answer to your question, please mark it as the answer.
Anton Palyok
Contributor
2526 Points
404 Posts
Re: How to insert this <add key="P01" value="Nombre o Razón Social" /> in the Web.config
Jun 15, 2011 08:10 PM|LINK
Hi,
Maybe you should to encode ampersand?
In web.config add this:
<configuration> <appSettings> <add key="P01" value="Nombre o Raz&oacute;n Social" /> </appSettings> </configuration>In codebehind file access to this parameter:
And now variable p01 equals to "Nombre o Razón Social"
Does it what you need?