如何在运行时在app.config中编写连接字符串? [英] How can I write the connection string in app.config at run time?
本文介绍了如何在运行时在app.config中编写连接字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有
我正在尝试创建一个项目,我想设计一个设置表单,让用户在文本框中输入连接字符串并将其保存在App.config文件中在应用生命的第一次。
你能帮我吗?
解决方案
试试这些链接 -
将连接字符串保存到app.config [ ^ ]
在App.Config文件中配置连接字符串期间C#中的运行时 [ ^ ]
对sa来说可能更有用在安装期间而不是第一个连接字符串。
搜索和查找:
https://msdn.microsoft.com/en-us/library/ms254494(v = vs.110)的.aspx [<一个href =https://msdn.microsoft.com/en-us/library/ms254494(v=vs.110).aspx\"target =_ blanktitle =新窗口> ^ ]
将连接字符串保存到app.config [ ^ ]
Dear all
I am trying to create a project and I want to design a Setting form to let the user to enter the connection string in a text box and save it in the App.config file in the first time of the application life.
Can you help me please?
解决方案
Try these links -
Saving Connection Strings to app.config[^]
Configuring a Connection String in the App.Config File During Runtime in C#[^]
It might be more useful to save the connection string during installation rather than the first.
Search and Find:
https://msdn.microsoft.com/en-us/library/ms254494(v=vs.110).aspx[^]
Saving Connection Strings to app.config[^]
这篇关于如何在运行时在app.config中编写连接字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文