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

What are the Types of chaching. How to implement caching

564


Explain the significance of routing? : asp.net mvc

542


What are the components of ado.net?

539


What is form method?

499


i develop a web application and i gave security setting i.e autherization and athentication now it work properly on my local system , now question is ,is this security setting ie autherization and athentication which i gave in web.config will it be enough strong to secure my application on internet or i have to use some 3rd party tool or software to get security .if yes --how ? if no--what is the alternate?

1516






Can you edit data in the Repeater control? Which template must you provide, in order to display data in a Repeater control? How can you provide an alternating color scheme in a Repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?

557


I want to connect a system in LAN and I want to access that. Whenever I am moving a mouse in my desktop, the similar thing has to happen in another system in which I have connected. I need coding for this in C# and ASP.NET Can anyone please help me. It is very urgent. Thanks in advance. My email id is manojkumarchallagundla@gmail.com Will you please?

1463


benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

1778


What are Session states available and its Uses?

1697


How many types of controls are there in asp.net?

527


What are the various session state management options provided by asp.net?

545


Which protocol is used to call a web service?

569


In which event are the controls fully loaded?

568


What is difference between cache and session?

502


Why viewstate is used in asp.net?

511