How to Insert a TextBox value in to Sql database using C#
coding?
Answer Posted / pranitha
first assign namespace like using system.data.sqlclient;
SqlCommand cmd = new SqlCommand("insert into emp
(EmpName,EmployeeCode,Designation,Location)values('" +
TextBox1.Text + "','" + TextBox2.Text + "','" +
TextBox3.Text + "','" + TextBox4.Text + "')");
Is This Answer Correct ? | 51 Yes | 33 No |
Post New Answer View All Answers
What is the use of web.config and machine.config files?
Explain the function of new view engine in asp.net? : asp.net mvc
What is application session?
What are the steps involved to fill a dataset?
How do I debug an asp.net application that was not written with visual studio.net and that does not use code-behind?
What is a postback ispostback and autopostback in asp net?
What are the advantages of using session?
What is Dynamic Web and discuss its usage with the help of real life examples?
How to display Alert in ASP.NET
1.What r collections? 2.What is .pdb file? 3.Is it possible to provide access to users in master page? 4.What is dirty n Phantom Read(SQL)? 5.What r different isolation levels(SQL)? 6.How to set authentication mode in web.config file?
Explain MVC model binders?
How do I force the dispose method to be called automatically, as clients can forget to call dispose method?
Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?
What is the life cycle of web page?
Is asp.net different from asp? If yes, explain how?