How to Insert a TextBox value in to Sql database using C#
coding?
Answer Posted / pranitha
first assign namespace like using system.data.sqlclient;
SqlCommand cmd = new SqlCommand("insert into emp
(EmpName,EmployeeCode,Designation,Location)values('" +
TextBox1.Text + "','" + TextBox2.Text + "','" +
TextBox3.Text + "','" + TextBox4.Text + "')");
| Is This Answer Correct ? | 51 Yes | 33 No |
Post New Answer View All Answers
What are asp.net web forms?
Describe SOA and the tenets of it?
What is AutoPostback?
What is application state?
What are uri parameters?
What is semantic gap?
What is the difference between table and query?
How can you handle errors in Web API?
Explain advantages of caching?
What are session cookies?
Do cookies store passwords?
What is an axd file?
How will you load dynamic assembly? How will create assesblies at run time?
Explain the difference between singleton and single call?
How can you apply a theme to your asp.net application?