We help IT Professionals succeed at work.

ASP.net Global.aspx

jeremiahscott
on
Medium Priority
1,182 Views
Last Modified: 2008-03-17
I read from the web.config in my global.aspx. How can I get this variable from my form?

protected void Application_Start(Object sender, EventArgs e)
{
   propertyId = ConfigurationSettings.AppSettings.Get("ID");      
}
Comment
Watch Question

Commented:
Have you tried:

propertyId = ConfigurationSettings.AppSettings("ID");

Author

Commented:
yea, i call that once when my app starts up in global.aspx. should i just call that each time from my form instead? is it costly to do that?
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
gotcha. thx!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.