⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addproduct.ascx

📁 网上书店
💻 ASCX
字号:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AddProduct.ascx.cs" Inherits="AdminControl_AddProduct" %>
<table border="1" cellpadding="0" cellspacing="0" style="width: 500px">
    <tr>
        <td align="center" colspan="2">
            添加图书</td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            图书名:</td>
        <td style="width: 350px; color: #00cc00">
            <asp:TextBox ID="txtBookName" runat="server"></asp:TextBox>
            *<asp:RequiredFieldValidator ID="rfvBookName" runat="server" 
                ControlToValidate="txtBookName" ErrorMessage="图书名不能为空!">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            图书编号:</td>
        <td style="width: 350px; color: #00cc00">
            <asp:TextBox ID="txtBookNO" runat="server"></asp:TextBox>
            *<asp:RequiredFieldValidator ID="rfvBookNO" runat="server" 
                ControlToValidate="txtBookNO" ErrorMessage="图书编号不能为空!">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            作者:</td>
        <td style="width: 350px">
            <asp:TextBox ID="txtAuthor" runat="server"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            出版社:</td>
        <td style="width: 350px">
            <asp:TextBox ID="txtPublisher" runat="server"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            价格:</td>
        <td style="width: 350px; color: #00cc00">
            <asp:TextBox ID="txtPrice" runat="server"></asp:TextBox>
            *<asp:RequiredFieldValidator ID="rfvPrice" runat="server" 
                ControlToValidate="txtPrice" ErrorMessage="请输入价格!">*</asp:RequiredFieldValidator>
            <asp:CompareValidator ID="cvPrice" runat="server" ControlToValidate="txtPrice" 
                ErrorMessage="请输入正确的价格!" Operator="GreaterThan" Type="Double" 
                ValueToCompare="0.0">*</asp:CompareValidator>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            备注:</td>
        <td style="width: 350px">
            <asp:TextBox ID="txtContent" runat="server" Height="67px" TextMode="MultiLine"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            图书小图片:</td>
        <td style="width: 350px; color: #00cc00">
            <asp:Image ID="imgSmall" runat="server" Height="148px" Width="141px" />
            <asp:FileUpload ID="fileUploadImageSmall" runat="server" />
            *<asp:RequiredFieldValidator ID="rfvImageSmall" runat="server" 
                ControlToValidate="fileUploadImageSmall" ErrorMessage="请选择图片1!">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            图书大图片:</td>
        <td style="width: 350px; color: #00cc00">
            <asp:Image ID="imgBig" runat="server" Height="148px" Width="141px" />
            <asp:FileUpload ID="fileUploasImageBig" runat="server" />
            *<asp:RequiredFieldValidator ID="rfvImageBig" runat="server" 
                ControlToValidate="fileUploasImageBig" ErrorMessage="请选择图片2!">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            是否推荐图书:</td>
        <td style="width: 350px">
            <asp:RadioButtonList ID="rblIsRecommand" runat="server" RepeatColumns="2">
                <asp:ListItem Value="true">是</asp:ListItem>
                <asp:ListItem Selected="True" Value="false">否</asp:ListItem>
            </asp:RadioButtonList>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            是否特价图书:</td>
        <td style="width: 350px">
            <asp:RadioButtonList ID="rblSpecialPrice" runat="server" RepeatColumns="2">
                <asp:ListItem Value="true">是</asp:ListItem>
                <asp:ListItem Selected="True" Value="false">否</asp:ListItem>
            </asp:RadioButtonList>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            所属分类:</td>
        <td style="width: 350px; color: #00cc00">
            <asp:ListBox ID="lbxCategory" runat="server" SelectionMode="Multiple" 
                onselectedindexchanged="lbxCategory_SelectedIndexChanged">
            </asp:ListBox>
            *<asp:RequiredFieldValidator ID="rfvCategory" runat="server" 
                ControlToValidate="lbxCategory" ErrorMessage="请选择所属分类">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 150px">
            数量:</td>
        <td style="width: 350px; color: #00cc00">
            <asp:TextBox ID="txtCount" runat="server"></asp:TextBox>
            *<asp:RequiredFieldValidator ID="rfvCount" runat="server" 
                ControlToValidate="txtCount" ErrorMessage="请输入数量!">*</asp:RequiredFieldValidator>
            <asp:CompareValidator ID="cvCount" runat="server" ControlToValidate="txtCount" 
                ErrorMessage="请输入大于0的整数!" Operator="GreaterThan" Type="Integer" 
                ValueToCompare="0">*</asp:CompareValidator>
        </td>
    </tr>
    <tr>
        <td align="center" colspan="2">
            <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="添加" />
        </td>
    </tr>
</table>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" 
    DisplayMode="List" ShowMessageBox="True" ShowSummary="False" />

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -