<%@ Page Language="C#" AutoEventWireup="true" CodeFile="N38_AddNewBook.aspx.cs" Inherits="N38_AddNewBook" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>添加新书</title>
    <link href="css/Style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
  window.onload = showdropitem;
function showdropitem()
{
    var el = document.getElementsByTagName("select");
    for(i=0;i<el.length;i++)
    {
        for(j=0;j<el[i].options.length;j++)
        {
            el[i].options[j].title = el[i].options[j].text;
        }
    }
}



  </script> 


</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 760px; height: 150px">
            <tr>
                <td style="width: 24px">
                </td>
                <td align="left" colspan="2" style="padding-left:100px ; font-size:15px;">添加新书
                </td>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td style="width: 24px">
                </td>
                <td style="width: 84px" align="right">
                    图书名称：</td>
                <td style="width: 349px">
                    <asp:TextBox ID="tbname" runat="server" Width="150px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvname" runat="server" ErrorMessage="请输入书名" ControlToValidate="tbname" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revname" runat="server" ControlToValidate="tbname"
                        Display="Dynamic" ErrorMessage="长度不能超过25个字" ValidationExpression="\S{0,25}"></asp:RegularExpressionValidator></td>
                <td style="width: 100px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 24px">
                </td>
                <td style="width: 84px" align="right">
                    图书分类：</td>
                <td style="width: 349px">
                    <asp:DropDownList ID="ddlcatalog" runat="server" Width="150px">
                    </asp:DropDownList></td>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td style="width: 24px">
                </td>
                <td style="width: 84px" align="right">
                    图书价格：</td>
                <td style="width: 349px">
                    <asp:TextBox ID="tbprice" runat="server" Width="150px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvprice" runat="server" ErrorMessage="请输入价格" ControlToValidate="tbprice" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revprice" runat="server" ControlToValidate="tbprice"
                        Display="Dynamic" ErrorMessage="请输入正确的价格" ValidationExpression="^\d+(\.\d+)?$"></asp:RegularExpressionValidator></td>
                <td style="width: 100px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 24px">
                </td>
                <td style="width: 84px" align="right">
                    图书数量：</td>
                <td style="width: 349px">
                    <asp:TextBox ID="tbamount" runat="server" Width="150px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvamount" runat="server" ErrorMessage="请输入图书数量" ControlToValidate="tbamount" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revamount" runat="server" ControlToValidate="tbamount"
                        Display="Dynamic" ErrorMessage="请输入正确的数量" ValidationExpression="\d+$"></asp:RegularExpressionValidator></td>
                <td style="width: 100px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 24px">
                </td>
                <td style="width: 84px" align="right">
                    图书ISBN：</td>
                <td style="width: 349px">
                    <asp:TextBox ID="tbisbn" runat="server" Width="150px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvisbn" runat="server" ErrorMessage="请输入图书ISBN" ControlToValidate="tbisbn" Display="Dynamic"></asp:RequiredFieldValidator></td>
                <td style="width: 100px">
                    </td>
            </tr>
            <tr>
                <td style="width: 24px">
                </td>
                <td style="width: 84px">
                </td>
                <td style="width: 349px">
                    <asp:ImageButton ID="ibtnok" runat="server" ImageUrl="~/n38_image/tj.gif" OnClick="ibtnok_Click" /></td>
                <td style="width: 100px">
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
