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
Can you explain page lifecycle in net?
WSDL means?
What is application in asp net?
What is server side in asp.net?
Mention the execution process for managed code?
How is a session stored and maintained in asp.net?
Is asp.net is a programming language?
Where do the cookie state and session state information be stored?
Where sessions are stored?
Can viewstate be accessed in another page?
What is the difference between ldap and active directory?
What is an imagemap in asp.net?
Why mvc is better than asp.net? : Asp.Net MVC
What does the hotspot class in .net do?
Explain an object, class and method.