zoukankan      html  css  js  c++  java
  • 为在母版页中的DataList脚模板中增加页码

    其实很简单的一个问题,但是多了个母版页就容易把人绕进去.

    简单来说就是忽略母版页的存在吧.

    下面是主要的代码

    全部代码下载

    <%@ Page Language="C#" MasterPageFile="~/mp.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default2" Title="Untitled Page" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        
    <asp:DataList ID="DataList1" runat="server" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyField="id" GridLines="Horizontal" OnItemCreated="DataList1_ItemCreated">
            
    <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            
    <SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
            
    <ItemTemplate>
                id:
                
    <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>'></asp:Label><br />
                name:
                
    <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>'></asp:Label><br />
                
    <br />
            
    </ItemTemplate>
            
    <AlternatingItemStyle BackColor="#F7F7F7" />
            
    <ItemStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            
    <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            
    <FooterTemplate>
                
    &nbsp;
            
    </FooterTemplate>
        
    </asp:DataList><br />
    </asp:Content>


    后台代码
  • 相关阅读:
    Kaggle 神器 xgboost
    改善代码可测性的若干技巧
    IDEA 代码生成插件 CodeMaker
    Elasticsearch 使用中文分词
    Java性能调优的11个实用技巧
    Lucene 快速入门
    Java中一个字符用unicode编码为什么不是两字节
    lucene 的评分机制
    面向对象设计的 10 条戒律
    2019.10.23-最长全1串(双指针)
  • 原文地址:https://www.cnblogs.com/thcjp/p/739486.html
Copyright © 2011-2022 走看看