Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: appSettings from web.config


Message #1 by wilfred miranda <wilfred_net@y...> on Sat, 8 Dec 2001 13:18:17 -0800 (PST)
I have a VB component with a code to read from

web.config like this but gives an InvalidCastException



when run. can anyone help ?

Is there anyother way to read values from web.config

file ?



Dim appsetting As Hashtable 

CType(HttpContext.Current.GetConfig("appsettings"),

Hashtable)

m_ConnectionString = CStr(appsetting("DSN"))





Thanks in advance,

Wilfred









__________________________________________________

Do You Yahoo!?

Send your FREE holiday greetings online!

http://greetings.yahoo.com

Message #2 by Tim Heuer <TimH@i...> on Sat, 8 Dec 2001 18:36:13 -0700
m_ConnectionString 

System.Configuration.ConfigurationSettings.AppSettings["DSN"]



-----Original Message-----

From: wilfred miranda [mailto:wilfred_net@y...]

Sent: Saturday, December 08, 2001 2:18 PM

To: ASP+

Subject: [aspx] appSettings from web.config





I have a VB component with a code to read from

web.config like this but gives an InvalidCastException



when run. can anyone help ?

Is there anyother way to read values from web.config

file ?



Dim appsetting As Hashtable 

CType(HttpContext.Current.GetConfig("appsettings"),

Hashtable)

m_ConnectionString = CStr(appsetting("DSN"))





Thanks in advance,

Wilfred









__________________________________________________

Do You Yahoo!?

Send your FREE holiday greetings online!

http://greetings.yahoo.com







  Return to Index