Web配置中的changconnection字符串在运行时 [英] changconnection string in web config at runtime

查看:76
本文介绍了Web配置中的changconnection字符串在运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须在Web配置中连接字符串,如下所示
<添加key ="conn" value ="server = abc \ sqlexpress; database = abc;用户ID = sa;密码= abc/>

我有一个网页,其中有4个文本框.
服务器名称为1,
2为数据库名称,
3个用户ID
4个用于密码

而且我必须在运行时执行.
请让我知道该怎么做?

谢谢你
莫哈末Wasif

Hi All,

I have to connection string as below in web config
<add key="conn" value="server=abc\sqlexpress;database=abc; User ID=sa; Password=abc />

I have a web page in that I have 4 textboxes.
1 for server name,
2 for database name,
3 for User ID
4 for Password

and I have to do it at runtime.
Please let me know how to do it?

Thanking You
Mohd. Wasif

推荐答案

http://www.google.com/search?hl=en&biw=1024&bih=575&q=chnage+connectionstring+dynamically+asp.net&aq=f&aqi=m1&aql=&oq=[^]

Enjoy Google :thumbsup:


如何在运行时修改Web.Config [
How To Modify Web.Config At Run Time[^]

Thanks to Google...got this as 1st result.


这篇关于Web配置中的changconnection字符串在运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆