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

Answer Posted / premkumar.m

in asp.net webform,

first assign namespace like using system.data.sqlclient;

insert coding

sqlcommand cmd = new sqlcommand("insert into address values
('"+ textbox1.text +"', "+ textbox2.text +")",
connectionstring);

note:

Is This Answer Correct ?    145 Yes 56 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the master page.

546


Explain the features that make asp.net more used framework? : asp.net mvc

467


How does ASP.NET framework maps client side events to Server side events.?

538


What is the purpose of App_Code folder in ASP.NET? Why we this?

595


What is microsoft windows sharepoint services?

532






What is fulltrust?

553


Who creates jsessionid?

551


can we remote debug applications with the remote debugger installed with vs.net 2002, with vs.net 2003?

1741


Is LINQ performance wise better or using sqlcommand?

4317


How do you secure your configuration files to be accessed remotely by unauthorized users?

613


What is css and what is it used for?

547


How does session id work?

480


Explain http handlers? Where we can use the http handlers?

677


Does asp.net still recognize the global.asa file?

547


What is a Cookie? Where is it used in ASP.NET?

598