摘要: 首先,用Select语句查询需要插入数据的表,用Top 1查一行就够了,但这个表中需要有一行数据,这个是为了给SqlDataAdapter生成表的架构用的。1.string strSql = "Select * from TableNeedToUpdate"; 2.SqlDataAdapter da = new SqlDataAdapter(strSql, SqlConn); 3.DataSet ds = new DataSet();U%oYY-Ec0 4.da.Fill(ds);+X*@ s$@-{-?0 5.//设置主键 6.ds.Tables[0].Prima 阅读全文
posted @ 2011-10-18 13:15 小锋神 阅读(5879) 评论(0) 推荐(0)
摘要: 几种文件上传的方法 第一种(务器控件):1.Default.aspx代码如下:<html xmlns="http://www.w3.org/1999/xhtml"><head> <title>文件上传</title></head><body> <form id="form1" action="Default2.aspx" enctype="multipart/form-data" method="post"> & 阅读全文
posted @ 2011-10-18 13:13 小锋神 阅读(618) 评论(0) 推荐(0)