2006年6月23日
摘要: private string GenerateCheckCode() { int number; char code; string checkCode = String.Empty; ... 阅读全文
posted @ 2006-06-23 15:55 过江 阅读(503) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebCon... 阅读全文
posted @ 2006-06-23 15:54 过江 阅读(590) 评论(0) 推荐(0) 编辑
摘要: //上传:用个FileUpload1控键string sFileName;sFileName = FileUpload1.FileName;string sFilePath = Server.MapPath("File");string strPath = System.IO.Path.Combine(sFilePath, FileUpload1.FileName);FileUpload1.P... 阅读全文
posted @ 2006-06-23 15:53 过江 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 第一种: if(!IsPostBack) {// datatable=obj.BindDataGrid_First("Project_BindDataGrid_First");// BindDataList(); datatable =obj.GetDataArrayList(); ... 阅读全文
posted @ 2006-06-23 15:52 过江 阅读(361) 评论(0) 推荐(0) 编辑
摘要: public static DataTable AllbyApply2( ) {// DataTable dt=new DataTable(); DataTable lastTable=new DataTable(); DataColumnCollection d=dt.Columns; ... 阅读全文
posted @ 2006-06-23 15:47 过江 阅读(288) 评论(0) 推荐(0) 编辑
摘要: CREATE PROCEDURE GetRecordFromPage @tblName varchar(255), -- 表名 @fldName varchar(255), -- 字段名 @PageSize int = 10, -- 页尺寸 @PageIndex int = 1, ... 阅读全文
posted @ 2006-06-23 15:45 过江 阅读(241) 评论(0) 推荐(0) 编辑
摘要: SqlConnection myConnection=new SqlConnection("server=localhost;uid=sa;pwd=;database=wjoa"); string sql1="select * from ResourseManage_T"; SqlDataAdapter adapterA=new SqlDataAdapt... 阅读全文
posted @ 2006-06-23 15:44 过江 阅读(1116) 评论(0) 推荐(0) 编辑
摘要: private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { if(e.Item.ItemType==ListItemType.Item||e.Item.ItemType==ListItemType.Alternat... 阅读全文
posted @ 2006-06-23 15:42 过江 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 第一: 把DATAGRID的属性ALLOWSORTING改为TRUE在PAGELOAD和DataGrid1_SortCommand、SortCommand中加p if(DataGrid1.Attributes["SortDirection"]=="DESC") //这里kjkm_dg为datagrid ID { Dat... 阅读全文
posted @ 2006-06-23 15:41 过江 阅读(1563) 评论(0) 推荐(0) 编辑
  2006年6月22日
摘要: GiveFocus(this.TextBox1);public void GiveFocus(Control c) { RegisterClientScriptBlock("CSP-focus-function", ""); RegisterStartupScript("CSP-focus", ""); } 阅读全文
posted @ 2006-06-22 13:59 过江 阅读(218) 评论(0) 推荐(0) 编辑