随笔分类 -  Asp.Net

Asp.Net,共同学习,共同进步
摘要:更新方法一,直接在GridView中来更新数据. 更新方法二,打开一个新的页面来更新数据. //更新 protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { GridView1.EditIndex = e.NewEditIndex; //PopulatePublishersGridView(); string sqlstr = getSQlStr(); bind(sqlstr); } //更新 protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { OleDbConnection sqlcon = new OleDbConnection(GetConnection()); string sqlstr = 阅读全文
posted @ 2010-05-08 17:39 叮当小马 阅读(643) 评论(0) 推荐(0)
摘要:根据主键来删除表中的数据。 //删除 protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { OleDbConnection sqlConnection = new OleDbConnection(GetConnection()); string sqlstr = "delete from MResume where id=" + GridView1.DataKeys[e.RowIndex].Value.ToString() + ""; OleDbCommand sqlcom = new OleDbCommand(sqlstr, sqlConnection); sqlConnection.Open(); sqlcom.ExecuteNonQuery(); sqlConnection.Close(); //PopulatePubli 阅读全文
posted @ 2010-05-08 17:37 叮当小马 阅读(595) 评论(0) 推荐(0)
摘要:/// /// 分页技术,触发事件 /// /// /// protected void gridViewPublishers_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView1.DataSource = SortDataTable(GridView1.DataSource as DataTable, true); GridView1.PageIndex = e.NewPageIndex; GridView1.DataBind(); } /// /// 分页实现 /// /// param name="da 阅读全文
posted @ 2010-05-08 17:34 叮当小马 阅读(691) 评论(0) 推荐(0)
摘要:GridView绑定数据. //绑定 public void bind(string str) { string oledbstr = ""; if (str != null && str != "") { oledbstr = str; } else { oledbstr = "select ID, 姓名,性别,出生日期,工作年限,证件类型,证件号,居住地,Email,手机号码,家庭电话,自我评价 from MResume order by id desc"; } OleDbConnection oledbcon = new OleDbConnection(GetConnection()); OleDbDataAdapter myda = new OleDbDataAdapter(oledbstr, oledbcon); DataSet 阅读全文
posted @ 2010-05-08 17:13 叮当小马 阅读(2048) 评论(0) 推荐(0)
摘要:Web.config配置 appSettings中配置access与sqlserver /appSettings 阅读全文
posted @ 2010-05-08 13:04 叮当小马 阅读(4973) 评论(0) 推荐(0)
摘要:本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/feng_sundy/archive/2007/01/05/1474966.aspx 阅读全文
posted @ 2010-01-24 20:13 叮当小马 阅读(3085) 评论(0) 推荐(0)
摘要:转贴:http://www.cnblogs.com/fan0136/archive/2009/06/02/1494432.html C#操作Excel:不存在类型或命名空间名称“Interop” 下载Microsoft.Office.Interop.Excel.dll http://files.cnblogs.com/fan0136/Microsoft.Office.Interop.Excel.rar 添加引用,浏览指定文件即可。 阅读全文
posted @ 2010-01-20 10:29 叮当小马 阅读(610) 评论(0) 推荐(0)
摘要:c#中一个窗体调用另一个窗体的控件及方法(转贴) 阅读全文
posted @ 2010-01-14 15:18 叮当小马 阅读(25416) 评论(1) 推荐(2)
摘要:VS2005与VS2008 阅读全文
posted @ 2009-07-21 11:15 叮当小马 阅读(430) 评论(0) 推荐(0)
摘要:aspx访问 IIS 元数据库失败 阅读全文
posted @ 2009-05-07 10:56 叮当小马 阅读(232) 评论(0) 推荐(0)