TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jyoti Jodha
NA
1.7k
406.9k
buttons don't work in asp.net c#
Oct 4 2017 7:29 AM
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;
}
}
Reply
Answers (
8
)
How to find the id of dynamic textbox in gridview using jque
Web API Introduction?