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

ASP.NET中GridView分页

方法一:
新建一个页面然后在页面拖一个GridView控件在属性框中设置GridView控件的AllowPaing属性为True 然后再设置GridView的PageSize属性,源文件如下:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames ="classId" CellPadding="5" OnRowDeleting="GridView1_RowDeleting" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" PageSize ="15">
            <Columns>
                <asp:BoundField DataField ="className" HeaderText ="名称" />
                <asp:BoundField DataField="classDes" HeaderText="描述" SortExpression="classDes" />
         </Columns>
          <PagerTemplate>
               <table style="font-size :12px;">
               <tr>
           
                 <td> 总共<asp:Label ID="Label1" runat="server" Text="<%#((GridView)Container.NamingContainer).PageCount %>"></asp:Label>页 &nbsp; </td>
               
                    <td> 第<asp:Label ID="Label2" runat="server" Text="<%#((GridView)Container.NamingContainer).PageIndex+1 %>"></asp:Label>页 &nbsp;</td>
                
 &n


相关文档:

asp.net中“线程正被中止”异常的解决方法

asp.net中“线程正被中止”异常的解决方法
在项目里负责异常处理部分:异常信息的写入,读取,查看,因此就可以看到各种异常,受益匪浅
看到有N多的“线程正被中止”异常,而且来自同一个页面。
System.Threading.ThreadAbortException: 线程正被中止。
at System.Threading.Thread.AbortInternal( ......

asp.net 程序动态添加gridview

前台:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
   
   
     ......

asp.net 页面跳转的几种方法

 
1 response.redirect 这个跳转页面的方法跳转的速度不快,因为它要走2个来回(2次postback),但他可以跳 转到任何页面,没有站点页面限制(即可以由雅虎跳到新浪),同时不能跳过登录保护。但速度慢是其最大缺陷!redirect跳转机制:首先是发送一个http请求到客户端,通知需要跳转到新页面,然后客户端在发送跳转 ......

关于asp.net的配置文件

配置文件可用来存放一些多次用到的常量数据,如连接串:
<appSettings>
<add key="connStr1" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="/>
<add key="connStr2" value="App_Data\test.mdb"/>
</appSettings>
这个配置数据库连接串
使用示例:
  public class DBCo ......

asp.net客户端传递参数心得

 
客户端传送数据到服务器端有三种方法:
1.form
2.querystring
3.cookie
利用这些方式取得的数据在服务器端都是字典集合,如果要精确取到某个集合的值,则直接使用对应的集合的名称,三种方式对应的集合如下:
1.form:request.form
2.querystring:request.querystring
3.cookie:request.cookie
利用request.p ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号