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 can you access the properties and controls of master pages from content pages?
Out of ASP or ASP.NET which one is stateless?
What are merge modules?
Does google crawl redirects?
What is the difference between a cookie and a pixel?
What is difference between session and cookies?
i want to implement grid view value in paypal site. so how to create this code in asp.net with C#
How to use a Master Database in Asp.net?
Why is global asax is used?
List the asp.net validation controls?
What are the versions of garbage collection?
What is the purpose of url encoding?
How can you identify that the page is post back?
How does u call and execute a sp in .net?
Explain server-side scripting and client-side scripting.