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
Define transparent caching with aop?
What is autopostback true?
Explain serialization and deserialization?
Explain the difference between the web config and machine config.
How information about the user's locale can be accessed?
What is ispostback property?
Define a multilingual website?
can we remote debug applications with the remote debugger installed with vs.net 2002, with vs.net 2003?
What are the main differences between asp and asp.net?
Explain how viewstate is being formed?
Explain the basic functionality of garbage collector?
What r the asp.net list controls and difference between them?
Explain the updatepanel?
What is a nested masterpage in asp.net 2.0? Can there be a master page inside a masterpage?
Explain what the contents of cookie?