- 博客(9)
- 收藏
- 关注
原创 GridView编辑状态绑定DropDownlist时,出现偶数行不能绑定情况
把 e.Row.RowState== DataControlRowState.Edit改为(e.Row.RowState & DataControlRowState.Edit)!=0就行。 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if ((e.Row
2012-09-10 11:02:20
1067
原创 C#文件下载方法代码
//得到下载文件的ContentType public string GetFileContentType(string filename) { string[] array = filename.Split('.'); string result = string.Empty; string suffix = "." + arr
2012-08-27 13:40:07
768
原创 TreeView控件动态绑定数据库内容
数据库结构: 表1:FID,DataName两个用到的字段,注意其中DataName为FID的名字 表2:FID,SID,DataName三个用到的字段,注意其中DataName为SID的名字 表1与表2关联字段为FID 后台CS文件封装函数代码: using System; using System.Collections.Generic; using System.Linq;
2012-08-27 13:30:19
1270
转载 清除Html标记的一个封装函数
后台.cs文件代码 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Text.RegularExpressions; /// ///AboutClearHtml 的摘要说明 /// public class AboutClearH
2012-08-27 13:14:45
553
原创 简单实现验证码功能
一个验证码页面CheckCode.aspx.cs的代码,其中CheckCode.aspx不需要任何添加与更改。 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;
2012-08-27 13:06:05
537
原创 C#中用session实现的用户登录代码与退出登录代码
点击登录按钮Button时 protected void denglu_Click(object sender, EventArgs e) { SqlConnection cn = conn.CreateConnection(); SqlCommand com = new SqlCommand(); com.Connection =
2012-08-27 12:54:50
7183
原创 C#动态绑定Menu控件
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using
2012-08-27 12:45:45
1930
原创 C#自定义用户浏览网页权限
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.Web
2012-08-27 12:39:07
1004
原创 C#ASP.net中数据连接静态方法类
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.SqlClient;//声明命名空间 using System.Configuration;;//声明命名空间 /// ///conn 的摘要说明 /// public c
2012-08-27 12:11:16
774
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅