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

differences between poco, model first and data first approach?

590


What is difference between Viewbag and Viewdata in ASP.NET MVC?

562


What is presentation framework?

545


Define the core components of an ASP.NET MVC application?

573


What are the versions of .net framework?

533






will there be any issues adding a table without primary keys to a data model?

602


What is ViewData and TempData in ASP.Net MVC?

573


How does servicing work for the .net framework 3.0?

534


How do you specify comments using razor syntax?

598


What are the major improvements provided by the common language runtime and the base class libraries? Or what are the major improvements in .net framework 4.0?

528


What is the domain object?

538


What are html helpers in asp.net mvc?

554


Explain the difference between viewbag and viewdata in mvc?

537


What is route config?

555


Why to use '{resource}.axd/{*pathInfo}' in routing in ASP.Net MVC?

2054