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
Where sessions are stored in asp.net?
What is a multilingual website?
how to transfer the file from client to server using asp.net
Can we make activex dll also ti execute in some process as that of client ? How can we do?
How do I open an ashx file in windows 7?
What is fulltrust?
What is a session http?
Explain client side state management system.
What is content place holder?
benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks
What is protected configuration?
To add a hyperlink column to the DataGrid which tag is used ?
how can create login from create and written conde in asp.net
What is parse in asp.net?
What does asp in asp.net stand for?