ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
How to Insert a TextBox value in to Sql database using C#
coding?
 Question Submitted By :: Mail2ssuresh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to Insert a TextBox value in to Sql database using C# coding?
Answer
# 1
insert into emp(empname) values('"+textbox1.value+"')


If you use html cocntrol textbox1.Value
or
If you use Aso cocntrol textbox1.Text
 
Is This Answer Correct ?    28 Yes 15 No
Chandra Shaker
 
  Re: How to Insert a TextBox value in to Sql database using C# coding?
Answer
# 2
insert into emp(empname) values('"+textbox1.Text+"');
 
Is This Answer Correct ?    30 Yes 10 No
Sona
 
 
 
  Re: How to Insert a TextBox value in to Sql database using C# coding?
Answer
# 3
Syntax:
       INSERT INTO table name(column name,column name,column
name)values(values,values,values);
Example:
       INSERT INTO
employee(Name,emp_id,designation)values('"+textbox1.text+"',"+textbox2.text+",'"+textbox3.text+"');


..................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 ?    42 Yes 14 No
V.vijayakumar
 
  Re: How to Insert a TextBox value in to Sql database using C# coding?
Answer
# 4
in asp.net webform,

first assign namespace like using system.data.sqlclient;

insert coding

sqlcommand cmd = new sqlcommand("insert into address values
('"+ textbox1.text +"', "+ textbox2.text +")", 
connectionstring);

note:
 
Is This Answer Correct ?    34 Yes 12 No
Premkumar.m
 
  Re: How to Insert a TextBox value in to Sql database using C# coding?
Answer
# 5
sqlcommand cmd = new sqlcommand("insert into address values
(@textbox1.text,@textbox2.text)",connectionstring);
 
Is This Answer Correct ?    3 Yes 4 No
Pksutha
 
  Re: How to Insert a TextBox value in to Sql database using C# coding?
Answer
# 6
sqlcommand cmd = new sqlcommand("insert into address values
('"+ textbox1.text +"', "+ textbox2.text +")", 
connectionstring);
 
Is This Answer Correct ?    5 Yes 3 No
Suthasyed
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
What is the syntax for datagrid and specifying columns ? Microsoft1
Have you used microsoft dataaccess blocks and Exception blocks? Microsoft1
What is the need to give <compilation debug=true> command ? Netsweeper3
I have a datagrid of 10 rows and I am updating the fifth row using template column edit. How wil u know that the row is updated, so that it can be send to database for updating the respective table?  3
What method do you use to explicitly kill a users session?  1
What is interval time of GC in .net  2
How can i include both C# and vb.net classes in same solution?  2
What is pre-init event in ASP.NET 2.0 page life cycle? Fulcrum-Logic1
Explain what a diffgram is, and a good use for one? FT1
How many Garbage Collectors are there for one Application or one Page Emphasis1
What definition correctly defines a label server control with the name set to lblHoop? a) <asp:Label name=?lblHoop? runat=?server? /> b) <Label id=?lblHoop? runat=?server? /> c) <asp:Label id=?lblHoop? runat=?server? /> d) <server label name=?lblHoop? runat=?asp? /> Syntax-Softtech1
Can the validation be done in the server side? Or this can be done only in the Client side?  2
About duration in caching technique ? Accenture2
what is SAP fullform SAP-Labs25
RequiredFieldValidator--write code in javascript Wipro2
What are Authentication mechanisms in .Net? Accenture5
What is a bubbled event?  2
What is the use of sessionstate tag in the web.config file?  2
What is the difference between control and component?  2
define silverlight and advantages ?  2
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com