易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.NET`config

之前一直做的WINFORM程序没有做过WEB的。习惯把做好的程序打包后,连接数据库的信息放在app.config中。
  写一下以前做过的winform代码:
C# code:

string connnectionString = System.Configuration.ConfigurationManager.AppSettings["source"];


然后在app.config中写:
C# code:

<appSettings>
<add key="source" value="server=127.0.0.1;user id=root; password=; database=printjft; pooling=false;CharSet=utf8" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>


_________________________________________________________________________________________
我现在要在web中实现 数据库信息写到 config中(web中有app.config么?或者是别的config?)
web中的代码如下:
C# code:


//定义水晶报表的数据库连接信息
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.DatabaseName = "Northwind";
connectionInfo.UserID = "xiaoming";
connectionInfo.Password = "woshixiaoming";
connectionInfo.ServerName


相关问答:

asp.net后台调用js方法 - .NET技术 / ASP.NET

<script type="text/javascript" src="js/Dialog.js"></script>
<script type="text/javascript">
  function zOpenD()
  {
  va ......

asp.net截取字符串

如下面的字符串:
abc-bdef-axdg,我只想取到第一个"-"的位置,该怎么写????

C# code:
string str = "abc-bdef-axdg";
Console.WriteLine(str.Substring(0, s ......

ASP.NET数据插入与更新!

dsQuyMst.Tables["QuyMst"].Rows[0]["SHDOCO"] = "1111";//这句报错(未将对象引用设置到对象的实例。)
这知道是什么原因?
高人指点~~~
using System;
using System.Data;
us ......

在asp.net里面脚本出错 - .NET技术 / ASP.NET

function CheckOpwd(){//验证用户名
var pwd=document.all.txtOpwd;

var div1=document.getElementById("divPwd");

if (pwd.value=="")
{
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号