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

Answer Posted / abcd

sqlcommand cmd=new sqlcommand("insert into dept values
('"+txtbox1.text+"'),con");
cmd.executenonquerry();

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are sections?

573


How to use Jquery Plugins in ASP.Net MVC validation?

544


How do you handle variable number of segments in a route definition?

532


If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?

1974


What is ViewData and TempData in ASP.Net MVC?

574






what do you mean by table-per-type?

625


Explain the advantages and disadvantages of ASP.Net MVC over ASP.NET?

536


Which filter executes first in an asp.net mvc application?

553


Why to use Html.Partial in ASP.Net MVC?

600


What is rxjava used for?

659


What is a model in programming?

551


How we can add the css in mvc?

590


Explain the difference between viewbag and viewdata in mvc?

540


What is object service? : Entity framework

631


sql related question (outer join, left, right etc) array vs hashtable CRL sqldatareader vs dataset what is WPF, WCF, compare to WinForms Webservices Asp.net MVC vs WebForms?

2959