Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
8
Reply
buttons don't work in asp.net c#
Jyoti Jodha
Oct 4 2017 7:29 AM
240
Reply
I am Using bootstrap templates
and i am want to save data in data base
don't show any Error or don't save data in database
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con;
con = new SqlConnection(ConfigurationManager.AppSettings["connect"]);
con.Open();
SqlCommand cmd;
cmd = new SqlCommand("Insert into registration (name,class) values('" + TextBox1.Text + "','" + TextBox2.Text + "')", con);
try
{
con.Open();
cmd.ExecuteNonQuery();
Label14.Text = "Data inserted successfully";
con.Close();
refress();
}
catch (Exception ex)
{
Label14.Text = ex.Message;
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
8
)
Next Recommended Forum
How to find the id of dynamic textbox in gridview using jque
Web API Introduction?