|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Can't get a value from my app.config fileWinforms, Vs2003
Code is Dim MyAppMgr as new System.configuration.AppsetingsReader Me.txextbox1.text = MyAppMgr.Getvalue("MyServerName",string) The IDE tells me that string is aclass type and so is not a valid expression. I know I'm trying to retrieve a string value so what's the proper syntax? Any help would be appreciated. Bob "Bob" <bduf***@sgiims.com> schrieb The second parameter must be a type object, not a type name:> Winforms, Vs2003 > Code is > > Dim MyAppMgr as new System.configuration.AppsetingsReader > Me.txextbox1.text = MyAppMgr.Getvalue("MyServerName",string) > The IDE tells me that string is aclass type and so is not a valid > expression. > I know I'm trying to retrieve a string value so what's the proper > syntax? Me.txextbox1.text = MyAppMgr.Getvalue("MyServerName", gettype(string)) Armin to get a value from your app.config file:
Imports System.Configuration.ConfigurationSettings dim aa as string aa = System.Configuration.ConfigurationSettings.AppSettings("Key") hope this works *** Sent via Developersdex http://www.developersdex.com ***
Problème data tramsmission from tableadapter to ACCESS database
Odd or Even Whats's the problem using a enum like this? Is It Possible to Retrieve a List of Declared Variables? How to: Retrieving BuiltinDocumentProperties from Word Document Inheritance and function issue late binding problem with option strict What happen to Find in Files in VS2005? convert rtf to html Hpow to create a background process/application? |
|||||||||||||||||||||||