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
Why do we need master page in asp.net?
What is the purpose of master page?
What is the biggest disadvantage of “Other Return Types” in Web API?
How can we use Web API with ASP.NET Web Form?
What are the differences between the response.write() and response.output.write()?
What is the benefit of WebAPI over WCF?
What are the security types in asp.net?
How tooltip is set through code-behind in ASP.NET?
What does the hotspot class in .net do?
What are themes and skins in 2.0, explain usage scenario?
Describe a bubbled event and how it is used ?
Why is xap important?
What is a pixel url?
there is two functions function a and function b like fun a(){.... ..... } fun b() { } in function b i write the coding to add two numbers and i need to dispaly the sum result in function a with out using global variable. how we do?
Is a dll file an executable?