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 (33)
 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
 
Suppose i create one application in vs 2008 and it is running in the latest version of IE,will it run in netscape and other browsers with low version? Wipro 2
Explain the scenario where we go for inpro and outpro session?   3
If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users? Syntax-Softtech 7
Where does Web.Config Info stored? Will this be stored in the registry? Accenture 4
How do you make your site SSL enabled ? Satyam 3
How you can use video conferencing in asp.net? guys plz help me ...   2
In a Code-Behind class generally which type of code is found ?   3
what are webservices?In which circumstances we can go for webservices? Microsoft 3
Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?   1
what is the assembly?   2
all asp.net interives questions   1
How many types of Stored Procedures in SQL Server Mind-Tree 4
 
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