zoukankan      html  css  js  c++  java
  • listView绑定数据

    <asp:ListView ID="ListView1" InsertItemPosition="LastItem" DataKeyNames="PId" runat="server" DataSourceID="ObjectDataSource1" >
    <ItemTemplate>
    <tr style="">
    <td>
    <asp:Label ID="PIdLabel" runat="server" Text='<%# Eval("PId") %>' />
    </td>
    <td>
    <asp:Label ID="PTypeIdLabel" runat="server" Text='<%# Eval("PTypeId") %>' />
    </td>
    <td>
    <asp:Label ID="PUserIdLabel" runat="server" Text='<%# Eval("PUserId") %>' />
    </td>
    <td>
    <asp:Label ID="PTitleLabel" runat="server" Text='<%# Eval("PTitle") %>' />
    </td>
    <td>
    <asp:Label ID="PUrlLabel" runat="server" Text='<%# Eval("PUrl") %>' />
    </td>
    <td>
    <asp:Label ID="PDesLabel" runat="server" Text='<%# Eval("PDes") %>' />
    </td>
    <td>
    <asp:Label ID="PClicksLabel" runat="server" Text='<%# Eval("PClicks") %>' />
    </td>
    <td>
    <asp:Label ID="PTimeLabel" runat="server" Text='<%# Eval("PTime") %>' />
    </td>
    <td>
    <asp:Label ID="PUpLabel" runat="server" Text='<%# Eval("PUp") %>' />
    </td>
    <td>
    <asp:Label ID="PDownLabel" runat="server" Text='<%# Eval("PDown") %>' />
    </td>
    <td>
    <asp:Button ID="DeleteButton" runat="server" CommandName="Delete"
    Text
    ="Delete" />
    <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="Edit" />
    </td>
    </tr>

    </ItemTemplate>
    <EditItemTemplate>
    <tr style="">

    <td>
    <asp:TextBox ID="PIdTextBox" runat="server" Text='<%# Bind("PId") %>' />
    </td>
    <td>
    <asp:TextBox ID="PTypeIdTextBox" runat="server" Text='<%# Bind("PTypeId") %>' />
    </td>
    <td>
    <asp:TextBox ID="PUserIdTextBox" runat="server" Text='<%# Bind("PUserId") %>' />
    </td>
    <td>
    <asp:TextBox ID="PTitleTextBox" runat="server" Text='<%# Bind("PTitle") %>' />
    </td>
    <td>
    <asp:TextBox ID="PUrlTextBox" runat="server" Text='<%# Bind("PUrl") %>' />
    </td>
    <td>
    <asp:TextBox ID="PDesTextBox" runat="server" Text='<%# Bind("PDes") %>' />
    </td>
    <td>
    <asp:TextBox ID="PClicksTextBox" runat="server" Text='<%# Bind("PClicks") %>' />
    </td>
    <td>
    <asp:TextBox ID="PTimeTextBox" runat="server" Text='<%# Bind("PTime") %>' />
    </td>
    <td>
    <asp:TextBox ID="PUpTextBox" runat="server" Text='<%# Bind("PUp") %>' />
    </td>
    <td>
    <asp:TextBox ID="PDownTextBox" runat="server" Text='<%# Bind("PDown") %>' />
    </td>
    <td>
    <asp:Button ID="UpdateButton" runat="server" CommandName="Update"
    Text
    ="Update" />
    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
    Text
    ="Cancel" />
    </td>
    </tr>
    </EditItemTemplate>

    </asp:ListView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAllList"
    TypeName
    ="MyPhotoList.BLL.Photos"
    DataObjectTypeName
    ="MyPhotoList.Model.Photos" DeleteMethod="Delete"
    InsertMethod
    ="Add" UpdateMethod="Update">


    </asp:ObjectDataSource>
  • 相关阅读:
    JavaScript构造函数学习笔记
    JavaScript面向对象编程学习笔记
    Maven学习--Maven项目目录、Maven坐标
    Maven学习--安装说明
    Watir问题---gem install watir-classic报错: ERROR: Error installing watir-classic: ERROR: Failed to build gem native extension.
    TestLink问题 —图表中文乱码
    TeskLink—增加一种需求类型(业务流程)(version1.9.8)
    Watir问题--LoadError: cannot load such file -- watir-classic
    Watir--Ruby + Watir环境安装
    Watir问题--Selenium::WebDriver::Error::WebDriverError: unexpected response, code=502, content-type="text/html"
  • 原文地址:https://www.cnblogs.com/gylspx/p/dsds.html
Copyright © 2011-2022 走看看