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

ASP.NET GridView的使用详解


这是要实现的功能:
第一步:拖入GridView控件 并且完成查询所有数据的方法 通过this.GridView1.DataSource 获取集合数据   GridView1.DataBind() 绑定数据
第二步:实现全选功能
1. 页面代码:
代码
 <asp:TemplateField HeaderText="全选">
                <HeaderTemplate>
                    <input type="checkbox" id="CheckBox1" name="CheckBox1" onclick="GetAllCheckBox(this)" />
                    全选
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="CheckBox2" />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="100px" />
</asp:TemplateField>
 2. 实现全选的JS代码:
代码
    <script type="text/javascript" language="javascript">
        function GetAllCheckBox(checkAll){
            var items = document.getElementsByName("CheckBox2");
            for(var i=0;i<items.length;i++){
       &


相关文档:

asp.net(C#)字符串加密

asp.net(C#)字符串加密
2010-03-12 09:59
using System;   
using System.Collections.Generic;   
using System.Text;   
using System.Security.Cryptography;//Cryptography密码术   
namespace DAL   
{   
......

ASP.NET连接SQL和ACCESS的方法

SQL:
using System.Data.SqlClient;
string sql = "server=.;uid=sa;pwd=;database=tablename;";
ACCESS:
using System.Data.OleDb;
string sql = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" + HttpRuntime.AppDomainAppPath + "//App_Data//db.mdb";
HttpRuntime.AppDomainAppPath 为根目录
......

【ASP.net技巧】asp.net弹出窗口 返回值

刚刚 看到这么一个问题,这里也做个标记:http://topic.csdn.net/u/20080411/14/7b0f9da5-0413-4149-91e9-72c3df3018a3.html?seed=327251592
第一种方式:
//在Visual Studio 2008中调试通过
testPop_Page.aspx:主页面ASPX代码
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  ......

asp.net 设置出错页

    <system.web> 
      <!--********出错页的设定********-->
    <customErrors mode="On" defaultRedirect="~/Error.htm"> </customErrors> ......

ASP.NET MVC2 学习笔记之URL路由

    新建一个默认的ASP.NET MVC2应用程序,系统会默认的生成包含基本功能的应用程序,查看这些生成的代码,可帮助我们理解ASP.NET MVC2。下面是对URL路由的理解,以备忘。
一、Global.asax.cs中的代码:
public class MvcApplication : System.Web.HttpApplication
    {
  &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号