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
What are the Types of chaching. How to implement caching
What are the different web pages?
Explain what is an assembly?
What is asp.net response object?
Why mvc is faster than asp.net? : Asp.Net MVC
What is a session http?
What are the different types of sessions in asp.net? Name them?
Can you clarified A Web service can only be written in .NET or not?
Explain culture and uiculture values.
Explain file-based dependency and key-based dependency.
What is http protocol and how it works?
How can we create a website?
Which protocol is used in a web api?
What is a web api? Which protocol is used in a web api?
What is the difference between Hash table and Array list?