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 to improve performance of web application asp.net mvc? : Asp.Net MVC

1024


What are the disadvantages of using session?

1102


Give an example of cookie abuse.

1074


Is asp.net and .net are same or different?

986


What is asp net application object?

1016


Explain the main differences between asp and asp.net?

1032


How Can assign alias name for ASP.NET Web API Action?

1453


Mention few asp.net validators.

1015


What is query string?

1012


What is web router?

923


Why we use content place holder in asp.net?

1036


Explain the steps needed to be performed in order to create an animation in xaml?

1015


Which type of state management is provided by Query String in ASP.NET?

1029


how can we create wcf in asp.net and how can we cll that in to asp.net application?plsss tel me each step clearly

2049


Explain Authentication mechanism in dotnet

1044