2006年6月23日
摘要: 写在前面:在asp.net页面中,有时候我们需要冻结datagrid中的某一列,比如显示的数据项过多时,我们需要让第一列不动,拖动横向滚动条时其他列隐藏,这时就需要冻结列了;另外,有时候也需要让datagrid的头部不动,拖动纵向滚动条时,下面的数据项可以滚动。在实现的过程中,其实就是用了css样式来控制,一起看一下。一.冻结某一列: 1 2 3 4 5 WebForm1 ... 阅读全文
posted @ 2006-06-23 16:14 过江 阅读(473) 评论(0) 推荐(0) 编辑
摘要: c#.net函数和方法集 作者:js5131 1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year;... 阅读全文
posted @ 2006-06-23 16:11 过江 阅读(301) 评论(0) 推荐(0) 编辑
摘要: ASP.NET程序中常用代码汇总(一) 1. 打开新的窗口并传送参数: //传送参数:response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="++"’)</script>") //接收参数:string a = Request.QueryString("id");string b... 阅读全文
posted @ 2006-06-23 16:10 过江 阅读(331) 评论(0) 推荐(0) 编辑
摘要: /**//// /// SecureAttribute 的摘要说明。 /// public class SecureAttribute { private static byte[] keys = new byte[] { 133, 98, 72, 143, 17, 162, 187, 83, 7, 15, 179, 1... 阅读全文
posted @ 2006-06-23 15:56 过江 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑