I have a .config file with ini format called menu.config
. I created a C# Web form Application in Visual Studio 2010, and I want to access/modify the values of this file. For example, edit Enable=1
to Enable=2
on [Menu 1]
. I have no idea how to start it. Hope someone can give me some suggestions, thank you!
[Menu1]
Enabled=1
Description=Fax Menu 1
[Menu2]
Enabled=1
description=Forms
I suggest you to store values in Web.config file and retrieve them in all application. U need to store them in app settings
and retrieve them as :
If you want to read from specific file.
Use Server.Mappath for setting path. Following will be the code.