易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.net Gridview 使用指南

GridView使用详解
 01 GridView无代码分页排序
 02 GridView选中,编辑,取消,删除
 03 GridView正反双向排序
 04 GridView和下拉菜单DropDownList结合
05 GridView和CheckBox结合
 06 鼠标移到GridView某一行时改变该行的背景色方法一
 07 鼠标移到GridView某一行时改变该行的背景色方法二
08 GridView实现删除时弹出确认对话框
09 GridView实现自动编号
10 GridView实现自定义时间货币等字符串格式
 11 GridView实现用“...”代替超长字符串
12 GridView一般换行与强制换行
13 GridView显示隐藏某一列
14 GridView弹出新页面/弹出新窗口
 15 GridView固定表头(不用javascript只用CSS,2行代码,很好用)
16 GridView合并表头多重表头无错完美版(以合并3列3行举例)
17 GridView突出显示某一单元格(例如金额低于多少,分数不及格等)
18 GridView加入自动求和求平均值小计
19 GridView数据导入Excel/Excel数据读入GridView 1.GridView简单代码分页排序: 1.AllowSorting设为True,aspx代码中是AllowSorting="True"; 2.默认1页10条,如果要修改每页条数,修改PageSize即可,在aspx代码中是PageSize="12"。 3.默认的是单向排序的,右击GridView弹出“属性”,选择AllowSorting为True即可。 4.添加代码: protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView1.PageIndex = e.NewPageIndex; Bind(); } 2.GridView选中,编辑,取消,删除: 后台代码: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient; public partial class _Default : System.Web.UI.Page { SqlConnection sqlcon; SqlCommand sqlcom; string strCon = "Data Source=(local);Database=数据库名;Uid=帐号;Pwd=密码"; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bind(); } } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { GridView1.EditIndex = e.NewEditIndex; bind(); } //删除 protected void GridView1_RowDeleting(object sender,


相关文档:

ASP.NET 首页性能的十大做法

ASP.NET 首页性能的十大做法
前言
本文是我对ASP.NET页面载入速度提高的一些做法,这些做法分为以下部分:
1.采用 HTTP Module 控制页面的生命周期。
2.自定义Response.Filter得到输出流stream生成动态页面的静态内容(磁盘缓存)。
3.页面GZIP压缩。
4.OutputCache 编程方式输出页面缓存。
5.删除页面空白字符串 ......

asp.net网页静态化

一。①:首先要有这个文件URLRewriter.dll,如果没有,赶快到网上下载一个,并将其放到下面的bin目录里面,并且将其引用添加到下面里面;
  ②:下面就是Web.Config文件的配置了,当然,配置过程相当简单:
  1:先添加这个
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.Rew ......

ASP.NET 如何实现伪静态

其实所谓的伪静态页面,就是指的URL重写.
1.首先在web.config里写
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>

2.在web.config里添加以下节点
<httpHandlers>
< ......

asp.net禁止页面刷新导致重复提交

网上找到的一个办法,也可以解决 用回车键代替提交按钮时,用户常按回车(非常快速的点回车)导致重复提交的情况: 
public class SubmitOncePage : System.Web.UI.Page
    {
        private string _strSessionKey;
      &n ......

Asp.net调用RAR压缩文件与解压文件源码

//压缩
protected void btnY_Click(object sender, EventArgs e)
{
 string rar;
 RegistryKey reg;
 string args;
 ProcessStartInfo procStart;
 Process process;
 try
 {
  reg = Registry.ClassesRoot.OpenSubKey(@"Applications\WinRAR.exe\Shell\Open\Command"); ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号