Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / ramachandraprabu

SqlConnection conn = new SqlConnection(strCon);
SqlCommand CmdSql = new SqlCommand("INSERT INTO Customers
(Firstname,Lastname,Address)Values('" + textbox1.Text
+ "', '"+textbox2.Test+"', '"+textbox3.Text+"')", conn);
CmdSql.ExecuteNonQuery();


\\If u use Html control we must use
textbox1.value
\\If u use asp.net controls we have to use
textbox1.text

Is This Answer Correct ?    51 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you access the properties and controls of master pages from content pages?

952


Out of ASP or ASP.NET which one is stateless?

1158


What are merge modules?

951


Does google crawl redirects?

908


What is the difference between a cookie and a pixel?

882


What is difference between session and cookies?

965


i want to implement grid view value in paypal site. so how to create this code in asp.net with C#

1869


How to use a Master Database in Asp.net?

1007


Why is global asax is used?

964


List the asp.net validation controls?

891


What are the versions of garbage collection?

1828


What is the purpose of url encoding?

911


How can you identify that the page is post back?

949


How does u call and execute a sp in .net?

936


Explain server-side scripting and client-side scripting.

858