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 sessions and cookies?
What is the extension of master page in asp.net?
what are the Custom controls in asp.net?
Explain the difference between server control and html control.
What is the benefit of WebAPI over WCF?
How do we implement bundling in MVC?
How do u deploy ur project?
How do you hide the columns?
Explain about the Class view window?
How to set the pane area to transparent of a scrollPane component.?
Can you clarified A Web service can only be written in .NET or not?
What do you mean by serialize?
What is clr? Difference between clr & cts?
What is a web pool?
What are different types of api?