Mikee Gutierrez

Mikee Gutierrez

  • NA
  • 36
  • 19k

C# ASP.NET

Jan 31 2016 11:17 PM
Create as asp.net application that has fields for name, transaction date (month, day, year), deposit, and withdraw.
• Name and transaction date are required field.
• Day must have a range validator (between 1 and 31).
• Please don't take into account at this time that some months have less than 31 days at this time.
• Have three buttons one to deposit, withdraw and one to clear.
• When you click deposit or withdraw it would show total in the form on a label.
• You would need to add appropriate styles. Your styles must be in an external style sheet.
• Lastly add a logo to your form.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Transaction.aspx.cs" Inherits="Project1.Project1.Transaction" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body style="height: 50px">
<form id="form1" runat="server">
<h1>Transaction Application</h1>
<label>Name</label><asp:TextBox runat="server" CssClass="entry" ID="txtName" />
<asp:RequiredFieldValidator ID="RequiredValidator1" runat="server" CssClass="validator" ErrorMessage="*required" ControlToValidate="txtName"></asp:RequiredFieldValidator>
<br />
<br />
<label>Month</label><asp:TextBox runat="server" ID="txtMonth" CssClass="entry" />
<asp:RequiredFieldValidator ID="RequiredValidator2" runat="server" ErrorMessage="*Required" ControlToValidate="txtmonth" CssClass="validator"></asp:RequiredFieldValidator>
<br />
<br />
<label>Day</label><asp:TextBox runat="server" ID="txtDay" CssClass="entry" />
<asp:RequiredFieldValidator ID="RequiredValidator3" runat="server" ErrorMessage="*required" ControlToValidate="txtDay" CssClass="validator"></asp:RequiredFieldValidator>
<asp:RangeValidator ID="RangeValidator1" runat="server" CssClass="validator" ErrorMessage="Day should be between 1 to 31" MaximumValue="31" MinimumValue="1" Type="Integer" ControlToValidate="txtDay"></asp:RangeValidator>
<br />
<br />
<label>Year</label><asp:TextBox runat="server" ID="txtYear" CssClass="entry" />
<asp:RequiredFieldValidator ID="RequiredValidator4" runat="server" ErrorMessage="*Required" ControlToValidate="txtmonth" CssClass="validator"></asp:RequiredFieldValidator>
<br />
<label>Amount</label><asp:TextBox runat="server" ID="txtAmount" CssClass="entry" />
<asp:RequiredFieldValidator ID="RequiredValidator5" runat="server" ErrorMessage="*Required" ControlToValidate="txtAmount" CssClass="validator"></asp:RequiredFieldValidator>
<asp:RangeValidator ID="RangeValidator2" runat="server" CssClass="validator" ErrorMessage="Amount should be between 1 to 10000" MaximumValue="10000" MinimumValue="1" Type="Double" ControlToValidate="txtamount"></asp:RangeValidator>
<br />
<br />
<label>Total</label><asp:Label runat="server" CssClass="result" ID="lblTotal" /><br />
<br />
<br />
<asp:Button runat="server" Text="Deposit" ID="btnDeposit" CssClass="button" OnClick="btnDeposit_Click1" />
<asp:Button runat="server" Text="Withdraw" ID="btnWithdraw" CssClass="button" OnClick="btnWithdraw_Click" />
<asp:Button runat="server" Text="Clear" ID="btnClear" CssClass="button" CausesValidation="False" OnClick="btnClear_Click" />
<asp:Label ID="lblMessage" runat="server" CssClass="message"></asp:Label>
</form>
</body>
</html>

Answers (2)