Web.config中appSettings元素的作用

看如下例子:

<appSettings>
<add key="APIKey" value="99898fds9fs89"/>
<add key="Tag" value="Bigfdfdfd"/>
</appSettings>

在程序中就可以用属性字段的方式获取value中的属性值:

labelAPI.text=ConfigurationManager.AppSettings["APIKey"];
posted @ 2010-09-29 16:13  chica  阅读(302)  评论(0编辑  收藏  举报