This repository was archived by the owner on Jan 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefault.aspx.cs
More file actions
48 lines (40 loc) · 1.37 KB
/
Default.aspx.cs
File metadata and controls
48 lines (40 loc) · 1.37 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
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace CS_ASP_019
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void submitButton_Click(object sender, EventArgs e)
{
double phone = double.Parse(phoneTextBox.Text);
int ss = int.Parse(ssTextBox.Text);
double salary = double.Parse(salaryTextBox.Text);
String result = String.Format("Thank you {0}, for your business<br>" +
"Your phone number is {1: (000) 000-0000}<br>" +
// "Your phone number is {1}<br>" +
"Your social security number is {2:000-00-0000}<br>" +
"The loan date you picked is {3:MMM d, yyyy}<br>" +
"The amount you want to borrow is: {4:C}",
nameTextBox.Text,
phone,
ss,
loanDateCalendar.SelectedDate,
salary);
if (result == "")
{
resultLabel.Text = String.Format("Please enter your information");
}
else
{
resultLabel.Text = result;
}
}
}
}