萧萧雨潇潇

关注

asp.net 从Web.config 传递参数到后台

萧萧雨潇潇

关注

阅读 65

2022-06-30

Web.config:

在 configuration 里面建

<AppSettings>

<add key="变量名" value="值"/>

</AppSettings>

后台获取:

 public static string a = ConfigurationManager.AppSettings["变量名"].ToString(); 

或public static string a = ConfigurationManager.AppSettings[索引].ToString();  

相关推荐

上善若水的道

认识ASP.NET配置文件Web.config

上善若水的道 218 0 0

简单聊育儿

Asp.Net中的获取Web.config中设置的参数!(前后台的代码示例)

简单聊育儿 49 0 0

沈芏

asp.net 2.0中新增的web.config的默认namespace功能

沈芏 149 0 0

老北京的热干面

.net Web.config工具类

老北京的热干面 64 0 0

王传学

在asp.net 2.0中的web.config文件中调用外部文件

王传学 119 0 0

佛贝鲁先生

ASP.net数据从Controller传递到视图

佛贝鲁先生 36 0 0

左手梦圆

asp.net 后台隐藏div

左手梦圆 66 0 0

天涯学馆

ASP.NET 后台调用js

天涯学馆 68 0 0

小月亮06

网页传递参数到Unity WebGL ,WebGL传递参数到网页

小月亮06 135 0 0

天涯学馆

Machine.Config 和 Web.Config

天涯学馆 113 0 0

精彩评论(0)

0 0 举报