□连接数据库 连接数据库 打开连接 string connstr=System.Configuration.ConfigurationSettings.AppSettings["sqllink"]; SqlConnection conn=new SqlConnection(connstr); conn.Open(); 添加DataGrid SqlDataAdapter dr=new SqlDataAdapter(sqlstr,conn); DataSet ds=new DataSet(); dr.Fill(ds,"usract"); if(Convert.ToInt32(ds.Tables["ContList"].Rows.Count.ToString())==0) { this.DataGrid1.ShowFooter=true; } this.DataGrid1.DataSource=ds.Tables["usract"].DefaultView; this.DataGrid1.DataBind(); ADO.NET应用 string sql="select count(*) as icount from sysoper where logname='"+this.usrname.Text+"'"; SqlCommand comm=new SqlCommand(sql,conn); SqlDataReader dr1=comm.ExecuteReader(); dr1.Read(); string count=dr1["icount"].ToString(); dr1.Close(); panel显示条 DIV滚动条 enconding加密 System.Web.HttpUtility.UrlEncode(this.txtgrpid.Text.Trim()) System.Web.HttpUtility.HtmlDecode(Request.QueryString["grpid"]) vs.net2003和vs.net2005 b2的使用 用2003 c:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i c:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -r 用2005 c:\WINNT\Microsoft.NET\Framework\v2.0.50215\aspnet_regiis.exe -i c:\WINNT\Microsoft.NET\Framework\v2.0.50215\aspnet_regiis.exe -r IIS注册 C:\>\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis -i 开始安装 ASP.NET (1.1.4322.0)。 已安装完 ASP.NET (1.1.4322.0)。 regsvr32 C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll webform调用windowsfrom if (MessageBox.Show("确定要删除?", "提示",MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation,MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification )==DialogResult.OK) {//do some useful things } //调用using System.Windows.Forms;这个包 表格强行换行 最新评论|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 ) GMT+8, 2024-9-29 23:27 , Processed in 0.156266 second(s), 12 queries , Gzip On, MemCache On. Powered by Discuz! X3.5 © 2001-2023 Discuz! Team. |