易截截图软件、单文件、免安装、纯绿色、仅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 中 Cookie的使用方法

方法1:
比如建立一个名为cnlive,值为"123"的cookie
HttpCookie cookie = new HttpCookie["cnlive"];
cookie.Value = "123";
Response.AppendCookie(cookie);
取刚才写入的Cookie值:
HttpCookie cookie = Request.Cookies["cnlive"];
cookieValue = cookie.Value;
在一个Cookie中储存多个信息:
HttpCookie cookie ......

asp.net动态生成html页面

适用于:microsoft ASP.NET
摘要:asp.net动态生成html页面,适用
简介
此功能适用于后台数据库功能不强的web站点,即大部分文本不是存放在数据库的记录中,而是放在html文件或者xml文件中,仅仅把索引放到数据库中,如文章标题、类别、查询关键字等。这样适合于后台没有诸如ms Sql Server这样的数据库支持的Web站点。
适 ......

学习asp.net C#

 1、DateTime   数字型  
System.DateTime   currentTime=new   System.DateTime();  
  1.1   取当前年月日时分秒  
currentTime=System.DateTime.Now;  
  1.2   取当前年  
int   年=currentTime.Year;  
  1.3   取当前月 &n ......

asp.net常用代碼


1.弹出对话框.
  a. 弹出对话框:
 
C# codeClientScript.RegisterStartupScript(this.GetType(), "",
"<script>window.alert('该会员没有提交申请,请重新提交!')</script>");
  b.转向指定页面
 
C# code Response.Write("
<script>window.location='http://www. ......

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号