-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer_signUp.aspx.cs
85 lines (74 loc) · 3.04 KB
/
customer_signUp.aspx.cs
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.IO;
public partial class Default2 : System.Web.UI.Page
{
Class1 obj = new Class1();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text != "" && TextBox2.Text != "" && TextBox3.Text != "" && TextBox4.Text != "" && TextBox5.Text != "" && TextBox6.Text != "" && TextBox7.Text != "" && TextBox8.Text != "" && TextBox9.Text != "")
{
if (TextBox10.Text == TextBox11.Text)
{
if (CheckBox1.Checked == true)
{
if (FileUpload1.HasFile == true)
{
String contenttype = FileUpload1.PostedFile.ContentType;
if (contenttype == "image/jpeg" || contenttype=="image/png")
{
string p1 = Server.MapPath("Customerprofile");
string p2 = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName);
this.FileUpload1.SaveAs(p1 + "/" + TextBox5.Text +p2 );
p1= ("Customerprofile/" + TextBox5.Text + p2);
string status = "null";
obj.ins_user(TextBox1.Text.Trim(), TextBox2.Text.Trim(), TextBox3.Text.Trim(), TextBox4.Text.Trim(), DropDownList1.SelectedValue.Trim(), TextBox5.Text.Trim(), TextBox6.Text.Trim(), TextBox7.Text.Trim(), TextBox8.Text.Trim(), p1, TextBox9.Text.Trim(), TextBox10.Text.Trim(),status);
Response.Redirect("thank.aspx");
}
else
{
Response.Write("<script>alert('File')</script>");
}
}
}
else
{
Response.Write("<script>alert('Check All Terms & Conditions.')</script>");
}
}
else
{
Response.Write("<script>alert('Please enter same Password.')</script>");
}
}
else
{
Response.Write("<script>alert('Enter All The Data.')</script>");
}
}
//protected void Button2_Click(object sender, EventArgs e)
//{
// if (FileUpload1.HasFile == true)
// {
// String contenttype = FileUpload1.PostedFile.ContentType;
// if (contenttype == "image/jpeg" || contenttype=="image/png")
// {
// Response.Write("<script>alert('Success')</Script>");
// }
// else
// {
// Response.Write("<script>alert('Not Upload')</Script>");
// }
// }
//}
}