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 is the purpose of session management?
Describe session handling in a webfarm?
Name the method that needs to be invoked on the dataadapter control to fill the generated dataset with data?
Explain asp.net page life cycle?
Give 2 examples for scenarios when routing is not applied?
What is the full meaning of asp.net?
What is caching in asp.net?
Define xmlvalidatingreader class.
Is redux flux?
Explain program to call the js function when the change is being made in the dropdown list made in asp.net mvc? : asp.net mvc
How is the asp.net mvc architecture different from others? : asp.net mvc
Which is the parent class of the web server control?
Which asp.net objects encapsulate the state of the client and the browser?
What is a session http?
What are the built-in objects in asp.net?