How to Insert a TextBox value in to Sql database using
C#.Net coding

Answer Posted / jayatirtha joshi

assign the textbox valuu to a string than using sqlcommand
in c# writing insert querry . insert the value into the
database.
ex; sqlcommand cmd=new sqlcommand("insert into emp values
('"+textbox1.text+"'),con");
cmd.executenonquerry();

Is This Answer Correct ?    24 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are Model Binders in ASP.Net MVC?

876


Is .net core replacing .net framework?

708


What is layout in mvc?

756


In which assembly is the mvc framework defined?

764


What is edm (entity data model)? : Entity framework

751


Explain dependency resolution?

824


What are HTML Helpers, AJAX Helpers in ASP.Net MVC?

761


Does Tempdata hold the data for other request in ASP.Net MVC?

742


How we can handle the exception at controller level in ASP.Net MVC?

799


How do you specify comments using razor syntax?

809


How to use multiple submit buttons in asp.net mvc?

808


What is Layout in ASP.Net MVC?

796


What is entity framework in asp net?

749


explain what does .edmx file contains?

840


How route table has been created in asp.net mvc?

739