ModifyBook.aspx
上传用户:tjxpgg
上传日期:2017-05-14
资源大小:2244k
文件大小:11k
源码类别:

SilverLight

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeFile="ModifyBook.aspx.cs" Inherits="Admin_ModifyBook" %>
  2. <%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" >
  5. <head runat="server">
  6.     <title>无标题页</title>
  7.     <script type="text/javascript" src="../My97DatePicker/WdatePicker.js">
  8. </script>
  9. </head>
  10. <body>
  11.     <form id="form1" runat="server">
  12.     <div>
  13.         &nbsp;<asp:DetailsView ID="DetailsBook" runat="server" AutoGenerateRows="False"
  14.             DataSourceID="ObjectDataSourceBook" Height="83px" Width="684px" DataKeyNames="Id" OnItemUpdating="DetailsBook_ItemUpdating">
  15.             <Fields>
  16.                 <asp:TemplateField HeaderText="EditorComment" SortExpression="EditorComment">
  17.                     <EditItemTemplate>
  18.                         <asp:TextBox ID="TextBox1" runat="server" Height="106px" Text='<%# Bind("EditorComment") %>'
  19.                             TextMode="MultiLine" Width="314px"></asp:TextBox>
  20.                     </EditItemTemplate>
  21.                     <InsertItemTemplate>
  22.                         <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("EditorComment") %>'></asp:TextBox>
  23.                     </InsertItemTemplate>
  24.                     <ItemTemplate>
  25.                         <asp:Label ID="Label1" runat="server" Text='<%# Bind("EditorComment") %>'></asp:Label>
  26.                     </ItemTemplate>
  27.                 </asp:TemplateField>
  28.                 <asp:TemplateField HeaderText="Image">
  29.                     <EditItemTemplate>
  30.                      <img src='<%# "CoverHandler.ashx?isbn="+Eval("ISBN") %>' alt=''/>
  31.                         <asp:FileUpload ID="FileUploadCover" runat="server" />
  32.                         <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
  33.                     </EditItemTemplate>
  34.                     <ItemTemplate>
  35.                        <img src='<%# "CoverHandler.ashx?isbn="+Eval("ISBN") %>' alt=''/>
  36.                     </ItemTemplate>
  37.                 </asp:TemplateField>
  38.                 <asp:TemplateField HeaderText="UnitPrice" SortExpression="UnitPrice">
  39.                     <EditItemTemplate>
  40.                         <asp:TextBox ID="TextBox12" runat="server" Text='<%# Bind("UnitPrice") %>'></asp:TextBox>
  41.                     </EditItemTemplate>
  42.                     <InsertItemTemplate>
  43.                         <asp:TextBox ID="TextBox12" runat="server" Text='<%# Bind("UnitPrice") %>'></asp:TextBox>
  44.                     </InsertItemTemplate>
  45.                     <ItemTemplate>
  46.                         <asp:Label ID="Label12" runat="server" Text='<%# Bind("UnitPrice") %>'></asp:Label>
  47.                     </ItemTemplate>
  48.                 </asp:TemplateField>
  49.                 <asp:TemplateField HeaderText="Author" SortExpression="Author">
  50.                     <EditItemTemplate>
  51.                         <asp:TextBox ID="TextBox11" runat="server" Text='<%# Bind("Author") %>'></asp:TextBox>
  52.                     </EditItemTemplate>
  53.                     <InsertItemTemplate>
  54.                         <asp:TextBox ID="TextBox11" runat="server" Text='<%# Bind("Author") %>'></asp:TextBox>
  55.                     </InsertItemTemplate>
  56.                     <ItemTemplate>
  57.                         <asp:Label ID="Label11" runat="server" Text='<%# Bind("Author") %>'></asp:Label>
  58.                     </ItemTemplate>
  59.                 </asp:TemplateField>
  60.                 <asp:TemplateField HeaderText="ISBN" SortExpression="ISBN">
  61.                     <EditItemTemplate>
  62.                         &nbsp;<asp:Label ID="LblISBN" runat="server" Text='<%# Bind("ISBN") %>'></asp:Label>
  63.                     </EditItemTemplate>
  64.                     <InsertItemTemplate>
  65.                         <asp:TextBox ID="TextBox10" runat="server" Text='<%# Bind("ISBN") %>'></asp:TextBox>
  66.                     </InsertItemTemplate>
  67.                     <ItemTemplate>
  68.                         <asp:Label ID="Label10" runat="server" Text='<%# Bind("ISBN") %>'></asp:Label>
  69.                     </ItemTemplate>
  70.                 </asp:TemplateField>
  71.                 <asp:TemplateField HeaderText="TOC" SortExpression="TOC">
  72.                     <EditItemTemplate>
  73.                         <FTB:FreeTextBox ID="FreeTextBoxToc" runat="server"   Text='<%# Eval("TOC") %>' >
  74.                         </FTB:FreeTextBox>
  75.                         </EditItemTemplate>
  76.                     <InsertItemTemplate>
  77.                         <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("TOC") %>'></asp:TextBox>
  78.                     </InsertItemTemplate>
  79.                     <ItemTemplate>
  80.                         <asp:Label ID="Label9" runat="server" Text='<%# Bind("TOC") %>'></asp:Label>
  81.                     </ItemTemplate>
  82.                 </asp:TemplateField>
  83.                 <asp:TemplateField HeaderText="WordsCount" SortExpression="WordsCount">
  84.                     <EditItemTemplate>
  85.                         <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("WordsCount") %>'></asp:TextBox>
  86.                     </EditItemTemplate>
  87.                     <InsertItemTemplate>
  88.                         <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("WordsCount") %>'></asp:TextBox>
  89.                     </InsertItemTemplate>
  90.                     <ItemTemplate>
  91.                         <asp:Label ID="Label8" runat="server" Text='<%# Bind("WordsCount") %>'></asp:Label>
  92.                     </ItemTemplate>
  93.                 </asp:TemplateField>
  94.                 <asp:TemplateField HeaderText="Title" SortExpression="Title">
  95.                     <EditItemTemplate>
  96.                         <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox>
  97.                     </EditItemTemplate>
  98.                     <InsertItemTemplate>
  99.                         <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox>
  100.                     </InsertItemTemplate>
  101.                     <ItemTemplate>
  102.                         <asp:Label ID="Label7" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
  103.                     </ItemTemplate>
  104.                 </asp:TemplateField>
  105.                 <asp:TemplateField HeaderText="PublishDate" SortExpression="PublishDate">
  106.                     <EditItemTemplate>
  107.                         <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("PublishDate") %>' onfocus="new WdatePicker(this)"></asp:TextBox>
  108.                     </EditItemTemplate>
  109.                     <InsertItemTemplate>
  110.                         <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("PublishDate") %>'   ></asp:TextBox>
  111.                     </InsertItemTemplate>
  112.                     <ItemTemplate>
  113.                         <asp:Label ID="Label6" runat="server" Text='<%# Bind("PublishDate") %>'></asp:Label>
  114.                     </ItemTemplate>
  115.                 </asp:TemplateField>
  116.                 <asp:TemplateField HeaderText="ContentDescription" SortExpression="ContentDescription">
  117.                     <EditItemTemplate>
  118.                         <asp:TextBox ID="TextBox5" runat="server" Height="155px" Text='<%# Bind("ContentDescription") %>'
  119.                             TextMode="MultiLine" Width="324px"></asp:TextBox>
  120.                     </EditItemTemplate>
  121.                     <InsertItemTemplate>
  122.                         <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("ContentDescription") %>'></asp:TextBox>
  123.                     </InsertItemTemplate>
  124.                     <ItemTemplate>
  125.                         <asp:Label ID="Label5" runat="server" Text='<%# Bind("ContentDescription") %>'></asp:Label>
  126.                     </ItemTemplate>
  127.                 </asp:TemplateField>
  128.                 <asp:TemplateField HeaderText="AurhorDescription" SortExpression="AurhorDescription">
  129.                     <EditItemTemplate>
  130.                         <asp:TextBox ID="TextBox4" runat="server" Height="140px" Text='<%# Bind("AurhorDescription") %>'
  131.                             TextMode="MultiLine" Width="296px"></asp:TextBox>
  132.                     </EditItemTemplate>
  133.                     <InsertItemTemplate>
  134.                         <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("AurhorDescription") %>'></asp:TextBox>
  135.                     </InsertItemTemplate>
  136.                     <ItemTemplate>
  137.                         <asp:Label ID="Label4" runat="server" Text='<%# Bind("AurhorDescription") %>'></asp:Label>
  138.                     </ItemTemplate>
  139.                 </asp:TemplateField>
  140.                 <asp:TemplateField HeaderText="CategoryId" SortExpression="CategoryId">
  141.                     <EditItemTemplate>
  142.                         <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("CategoryId") %>'></asp:TextBox>
  143.                     </EditItemTemplate>
  144.                     <InsertItemTemplate>
  145.                         <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("CategoryId") %>'></asp:TextBox>
  146.                     </InsertItemTemplate>
  147.                     <ItemTemplate>
  148.                         <asp:Label ID="Label3" runat="server" Text='<%# Bind("CategoryId") %>'></asp:Label>
  149.                     </ItemTemplate>
  150.                 </asp:TemplateField>
  151.                 <asp:TemplateField HeaderText="PublisherId" SortExpression="PublisherId">
  152.                     <EditItemTemplate>
  153.                         <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("PublisherId") %>'></asp:TextBox>
  154.                     </EditItemTemplate>
  155.                     <InsertItemTemplate>
  156.                         <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("PublisherId") %>'></asp:TextBox>
  157.                     </InsertItemTemplate>
  158.                     <ItemTemplate>
  159.                         <asp:Label ID="Label2" runat="server" Text='<%# Bind("PublisherId") %>'></asp:Label>
  160.                     </ItemTemplate>
  161.                 </asp:TemplateField>
  162.                 <asp:CommandField ShowEditButton="True" />
  163.             </Fields>
  164.         </asp:DetailsView>
  165.     
  166.     </div>
  167.         <asp:ObjectDataSource ID="ObjectDataSourceBook" runat="server" DataObjectTypeName="MyBookShopModels.Books"
  168.             SelectMethod="GetModel" TypeName="MyBookShopDAL.Books" UpdateMethod="Update">
  169.             <SelectParameters>
  170.                 <asp:QueryStringParameter Name="Id" QueryStringField="bookid" Type="Int32" DefaultValue="4939" />
  171.             </SelectParameters>
  172.         </asp:ObjectDataSource>
  173.         &nbsp; &nbsp;
  174.     </form>
  175. </body>
  176. </html>