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 clickid?
Explain the use of duration attribute of @outputcache page directive.
What is the difference between client-side and server-side validations in ASP.NET?
In early binding will the method invoked on com component will verify it?s existance in the system or not ?
What is the difference between application state and caching?
What is asp.net mvc? : asp.net mvc
What is sdlc process?
What is the use of service provider?
How to Insert/Add in ASPXgridview
What is the difference between viewstate and hidden field in asp.net?
How ASP and ASP.NET page works? Explain about asp.net page life cycle?
What is scope of an application variable in asp.net?
When was asp.net released?
Explain about Application and Session Events ?
Which Is Faster MVC or ASP.net ?