-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup button coding.txt
43 lines (39 loc) · 1.43 KB
/
signup button coding.txt
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
namespace Shandling
{
public partial class SignUp_Form : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void SIGNUP_Click(object sender, EventArgs e)
{
FileUpload1.SaveAs(Server.MapPath("~/image/") + Path.GetFileName(FileUpload1.FileName));
String link = "image/" + Path.GetFileName(FileUpload1.FileName);
string qry = "insert into signup values('" + id.Text + "','" + email.Text + "','" + password.Text + "','" + cpassword.Text + "','" + accesslevel.Text + "','" + name.Text + "','" + link + "')";
DAL obj = new DAL();
obj.udl(qry);
id.Text = "";
email.Text = "";
password.Text = "";
cpassword.Text = "";
accesslevel.Text = "";
name.Text = "";
link = "";
string message = "Your details have been saved successfully.";
string script = "window.onload = function(){ alert('";
script += message;
script += "')};";
ClientScript.RegisterStartupScript(this.GetType(), "SuccessMessage", script, true);
//Response.Redirect("login.aspx");
}
}
}