namespace OnlineReportSystem.Admin { public partial class AdminRagistration : System.Web.UI.Page { SqlConnection con = new SqlConnection("Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\\Users\\Avani\\Documents\\\\\\mynewdb.mdf;Integrated Security=True;Connect Timeout=30;"); protected void Page_Load(object sender, EventArgs e) { } protected void btnNext1_Click(object sender, EventArgs e) { // Response.Write(TabContainer1.ActiveTabIndex.ToString()); TabContainer1.ActiveTab = TabContainer1.Tabs[TabContainer1.ActiveTabIndex + 1]; } protected void btnCreateSchema_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "Create table " + txtSchema.Text + ";"; cmd.CommandType = CommandType.Text; try { using (con) { con.Open(); cmd.ExecuteNonQuery(); con.Close(); Response.Write("successfull"); } } catch (Exception ex) { Response.Write(ex); } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)