using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class user_reg : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { int id = int.Parse(TextBox7.Text); string name = TextBox1.Text; string mail = TextBox2.Text; string pwd = TextBox3.Text; logic log = new logic(); if (log.addUser(name,mail,id,pwd) == true) { //lblmsg.Text = "Registration successful"; //Response.Write("Registration successful"); Response.Redirect("~/home.aspx", true); } else { lblmsg.Text = "Registration unsuccessful"; } } }