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
How to improve performance of web application asp.net mvc? : Asp.Net MVC
What are the disadvantages of using session?
Give an example of cookie abuse.
Is asp.net and .net are same or different?
What is asp net application object?
Explain the main differences between asp and asp.net?
How Can assign alias name for ASP.NET Web API Action?
Mention few asp.net validators.
What is query string?
What is web router?
Why we use content place holder in asp.net?
Explain the steps needed to be performed in order to create an animation in xaml?
Which type of state management is provided by Query String in ASP.NET?
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
Explain Authentication mechanism in dotnet