ALLInterview.com :: Home Page            
 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                      
Google
   
 
Categories >> Software >> Microsoft Related >> ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions (615)
 C Sharp interview questions  C Sharp Interview Questions (722)
 ASP.NET interview questions  ASP.NET Interview Questions (1444)
 VB.NET interview questions  VB.NET Interview Questions (151)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (199)
 IIS interview questions  IIS Interview Questions (86)
 MTS interview questions  MTS Interview Questions (5)
 Crystal Reports interview questions  Crystal Reports Interview Questions (62)
 BizTalk interview questions  BizTalk Interview Questions (34)
 Dot Net interview questions  Dot Net Interview Questions (861)
 Exchange Server interview questions  Exchange Server Interview Questions (103)
 SharePoint interview questions  SharePoint Interview Questions (25)
 WCF interview questions  WCF Interview Questions (8)
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions (193)
Question
How to Insert a TextBox value in to Sql database using C#
coding?
 Question Submitted By :: ASP.NET
I also faced this Question!!     Answer Posted By  
 
Answer
# 11
SqlConnection con = new SqlConnection();

con.ConnectionString = "data source=anand\\sqlexpress.
initial catalog=Database1;integrated security=sspi;";

SqlCommand myCommand = new SqlCommand();

myCommand.CommandText = "Insert into
usr(firstname,lastname,dob,phno,email,Address,state,bgroup)
Values('" + firstname.Text + "','" + lastname.Text + "'," +
dob.Text + "," + phno.Text + ",'" + email.Text + "','" +
Address.Text + "','" + state.Text + "','" + bgroup.Text + "')";

myCommand.Connection = con;

con.Open();

myCommand.ExecuteNonQuery();

con.Close();
 
Is This Answer Correct ?    5 Yes 4 No
Anand
 
Answer
# 12
string strconn = @"Data Source=localhost;
Initial Catalog=Bala;
Trusted_Connection=yes;";
SqlConnection conn = new SqlConnection(strconn);
conn.Open();
string insertcommand = "insert into Employee
values('" + TextBox1.Text + "','" + TextBox2.Text + "','" +
TextBox3.Text + "')";
SqlCommand cmd = new SqlCommand(insertcommand, conn);
cmd.ExecuteNonQuery();
conn.Close();
 
Is This Answer Correct ?    3 Yes 2 No
Balakumar
 
Answer
# 13
How to Insert two TextBoxs values in to one column sql database using C# coding 
Is This Answer Correct ?    0 Yes 0 No
Surendra
 
Answer
# 14
insertBox("(Text1.Text)")+("(Text1.Text)"); 
Is This Answer Correct ?    0 Yes 0 No
Thualsi
 
Answer
# 15
almost all the posted answers above are correct(85%). 
Is This Answer Correct ?    3 Yes 4 No
Mmm
 
Answer
# 16
c# question in type 
Is This Answer Correct ?    0 Yes 4 No
Ghanshyam Verma
 
Answer
# 17
try
{
SqlConnecion cn=new SqlConnection("Data
source=.;database=Studentdetail;uid=sa;pwd=sa");
SqlCommand cmd=new SqlCommand();
cn.Open();
string qry;
qry="insert into Table values('"+ TextBox1.Text +"','"+
TextBox2.Text +"')";
cmd=new(qry,cn);
cmd.cmd.ExecuteNonQuery();


cn.Close();
}
catch(Exception ex)
{
Responce.Write(ex.Message.ToString());
}
 
Is This Answer Correct ?    0 Yes 6 No
Jeevananth
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
what are the oops concepts are used in your project? Kotak 1
Hi! Could any 1 please suggest me a free practice online exam for asp.net exams.. thanks   1
What is the answer for "Which configuration Tool your using means" ? we have to tell about IIS or .Net Framework or VSS? Give me in brief ? eXensys 3
Explain what a diffgram is and a good use for one? Syntax-Softtech 1
What?s a bubbled event?   1
hi all; i need standard notes on .net(basics) for my seminar. im a starter in .net. plz suggest whr can i get satisfactory notes!!!   1
What data type does the Range Validator control support?   4
Name two properties common in every validation control?   1
What are Themes? What is their use ?   1
How do you use a custom validator? When might you want to use one? Infosys 2
.Net Doesn't offer Deterministic Distruction ? a) True b) False CTS 4
Why is validation always done on the server? When does that occur?   2
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com