-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddBks.aspx
More file actions
35 lines (28 loc) · 2.31 KB
/
addBks.aspx
File metadata and controls
35 lines (28 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="addBks.aspx.cs" Inherits="Assignment3.addBks" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="formPlaceHolder" runat="server">
<div class="container">
<div class="well-lg">
<div class="center-block" style="width: 40%;">
<h2 class="text-center">
<asp:Label ID="lbl3" Text="Enter the book data" runat="server"></asp:Label>
</h2>
<asp:TextBox ID="Ttl" CssClass="form-control text-center" MaxLength="50" Placeholder="Enter the title of the book" runat="server"></asp:TextBox>
<asp:TextBox ID="Auth" CssClass="form-control text-center" MaxLength="50" Placeholder="Enter the author" runat="server"></asp:TextBox>
<asp:TextBox ID="ISBN" CssClass="form-control text-center" MaxLength="13" Placeholder="Enter book ISBN (without dashes)" runat="server"></asp:TextBox>
<asp:Button ID="btnAdd" CssClass="btn btn-primary btn-block" Text="Add!" runat="server" OnClick="btnAdd_Click"></asp:Button>
<input id="Reset" type="reset" value="Clear" class="btn btn-danger btn-block" />
<p>
<asp:RequiredFieldValidator ID="ReqTitle" CssClass="text-danger" ControlToValidate="Ttl" runat="server" ErrorMessage="You must enter a book title!"></asp:RequiredFieldValidator></p>
<p>
<asp:RequiredFieldValidator ID="ReqAuth" CssClass="text-danger" ControlToValidate="Auth" runat="server" ErrorMessage="You must enter an author!"></asp:RequiredFieldValidator></p>
<p>
<asp:RequiredFieldValidator ID="ReqISBN" CssClass="text-danger" ControlToValidate="ISBN" runat="server" ErrorMessage="You enter an ISBN!"></asp:RequiredFieldValidator></p>
<p>
<asp:RegularExpressionValidator ID="RegExVal" CssClass="text-danger" runat="server" ErrorMessage="Invalid ISBN format!" ControlToValidate="ISBN" ValidationExpression="^(97(8|9))?\d{9}(\d|X)$"></asp:RegularExpressionValidator>
</p>
</div>
</div>
</div>
</asp:Content>