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                      
tip   SiteMap shows list of All Categories in this site.
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
1.can we add connection string in global.asax??????????
2.what are the default files included when we create new 
web application????
 Question Submitted By :: Aseem
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
Answer
# 1
<%@ Import Namespace=”System.Data” %>
<%@ Import Namespace=”System.Data.Odbc” %> <script
language=”C#” runat=”server”>
    void Application_Start()
    {
        //Connection string for SQL Server with trusted
connection
        Application.Add (”DB_CONNECTION_STRING”,”DRIVER={SQL
Server};SERVER=ServerName;DATABASE=DataBaseName;Trusted_connection=yes;”);
    }
    void Session_Start()
    {
        //open connection to database
        OdbcConnection  cnConnection = new OdbcConnection
(Application.Get(”DB_CONNECTION_STRING”).ToString());
        cnConnection.Open();
        Session.Add (”DB_CONNECTION”, cnConnection );
    }
    void Session_End()
    {
        //a graceful disconnect
        OdbcConnection cnConnection = (OdbcConnection)
Session["DB_CONNECTION"];
        cnConnection.Close ();
    }
</script>
 
Is This Answer Correct ?    3 Yes 1 No
Deepak
 
  Re: 1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
Answer
# 2
1)We can't add connection string in global.asax file. we can
create connection string in web.config file only.
2)global.asax,web.config,Default.aspx files and
app_code,app_data,app_themes folders.
 
Is This Answer Correct ?    2 Yes 4 No
Himasankar
 
 
 
  Re: 1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
Answer
# 3
Connection String can be stored as an Application Variable.
 
Is This Answer Correct ?    1 Yes 0 No
Jerry Joseph
 
  Re: 1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
Answer
# 4
it is possible only by using session but it is not 
good practics
 
Is This Answer Correct ?    2 Yes 0 No
Sandeep
 
  Re: 1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
Answer
# 5
no,we can't add the connection string in global.asax..
global.asax is a text file,It is use to define the global 
variable.
 
Is This Answer Correct ?    0 Yes 4 No
Chaitali
 
  Re: 1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
Answer
# 6
Yes you Can add Connection string in Global.aspx in the 
[Sub Application_Start] or in the [Sub Session_Start]
 
Is This Answer Correct ?    0 Yes 0 No
Ahmad Dawood
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
Below is a code extract from an ASP.Net application. The code basically reads data from the “name” field in the “members” table and prints them onto the webpage. Using the assumptions provided, fill in the 4 blanks below so that the code will run correctly. ‘Assumptions: ‘conn_str is a variable that holds the connection string to the database ‘Objects dbcomm and dbread are already declared earlier dbcomm = New OleDbCommand("SELECT name FROM members", conn_str) dbread = dbcomm._______________ _____________________ response.write(_______________) _____________________ dbread.Close() Techno-Solutions3
How many rounds are there for a software programmer to clear interview in any IT industries(MNC). HCL2
What is the difference between control and component?  2
What?s the difference between Response.Write() andResponse.Output.Write()?  2
difference between <connectionstring> <Appsetting>  6
what is difference between User Control,Custom Contro1,Web server control and template controls  1
How we generate the BARCODE in ASP.Net using c# ! in library management systen for books .  2
In try catch blocks one is normal catch block and another is sqlcatchexception block Microsoft3
Difference between asp and asp.net? Accenture3
What is the difference between ExecuteReader,ExecuteNonQuery and ExecuteScalar.  3
On what object is the transaction in ADO.NET focused on? a) The command object b) The DataSet object c) The Connection object d) The DataAdapter object Syntax-Softtech4
How can you get public key information? Microsoft1
Hi, I am working in a small software company in asp.net platform. I need to know how and what are all the task in asp.net will be assigned for the developers in mnc companies. Thanks in advance.  1
What are the disadvantages of view state / what are the benefits?  2
How is a property designated as read-only?  2
relacement of websevices in .net 3.0? Mind-Tree1
what are Httpmodule and HttpHandler? Microsoft2
What is role-based security?  1
Which control would you use if you needed to make sure the values in two different controls matched?  3
can we call webservice in Html form? Microsoft1
 
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