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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / 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

More Dot Net Framework Interview Questions

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

0 Answers  


What is the greatest advantage of using asp.net mvc over asp.net webforms?

0 Answers  


Which are the important namespaces used in ASP.Net MVC?

0 Answers  


How to update one of my table in database at 4pm every day how it is possible?

0 Answers  


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

0 Answers  


How to answer for project questions..?

0 Answers  


When i am using Ajax controls (updatepanel),Is page events all are executed or only some events are executed?which page events are executed?

5 Answers   TCS,


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

0 Answers  


Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

1 Answers  


What is the .net framework?

0 Answers  


Can we change web.config settings from iis?

0 Answers  


How do you initiate a string without escaping each backslash ?

1 Answers  


Categories