|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
namespace SampleHacking
{
public partial class SignUp : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void SignUp_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|UserDetails.mdf;Integrated Security=True;User Instance=True");
conn.Open();
SqlCommand cmd = new SqlCommand("Insert into Authentication values('"+txt1.Text+"','"+txt2.Text+"')",conn);
cmd.ExecuteNonQuery();
conn.Close();
successlbl.Text = "Sign up successful go back to login page";
}
protected void BackBtn_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx");
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.