Wednesday, 15 April 2015

c# - Get winform Webbrowsercontrol Source from app config file -



c# - Get winform Webbrowsercontrol Source from app config file -

can please show me how winforms webbrowsercontrol source appconfig file ?.

i tried next it's not working

webbrowser2.navigate = configurationmanager.appsettings["dateandtime"];

and how app config file

<?xml version="1.0"?> <configuration> <configsections> </configsections> <appsettings> <add key="serverip" value="127.0.0.1" /> <add key="dbport" value="3306" /> <add key="defdatabase" value="waq115" /> <add key="dateandtime" value="http://free.timeanddate.com/clock/i4daxch9/n77/fs18/fcfff/tc212426/pc212426" /> </appsettings> <startup><supportedruntime version="v2.0.50727"/></startup> </configuration>

navigate() method not variable, next line of code not compile,

webbrowser2.navigate = configurationmanager.appsettings["dateandtime"];

you have read url application configuration file , pass argument navigate("url") method follows.

webbrowser1.navigate(configurationmanager.appsettings["dateandtime"]);

c# winforms webbrowser-control app-config

No comments:

Post a Comment