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 is orm entity framework?

518


what is conceptual model?

599


What is the difference between viewbag and viewdata in mvc?

531


What is the 'page life cycle' of an ASP.NET MVC?

604


What are the options can be configured in AJAX helpers?

583






Do I need microsoft .net framework?

550


Explain RenderBody and RenderPage in ASP.Net MVC?

591


What are Code Blocks in Views?

661


What symbol would you use to denote, the start of a code block in razor views?

565


What are Action Methods in ASP.NET MVC?

572


what is msl?

628


What is the use of web api ? Why web api needed, if you have already restful services using wcf ?

546


Is .net framework backwards compatible?

602


Explain how you can send the result back in JSON format in MVC?

578


How can we determine action invoked from HTTP GET or HTTP POST?

564