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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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
 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 ?    0 Yes 0 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 ?    1 Yes 0 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 ?    0 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 ?    0 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 0 No
Chaitali
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
diffrance between stored procedure & function in sql server?  2
What is shadowing? Syntax-Softtech1
What is operator overloading in dotnet  1
What is the use of web.config? Difference between machine.config and Web.config?  3
what is assembly? Microsoft2
In what order do the events of an ASPX page execute. As a developer, why is it important to understand these events? Syntax-Softtech3
What is WebService ? Tanla-Solutions3
Can we throw exception from catch Block? Accenture5
Types of values mode can hold session state in web.config ? Accenture1
Can you explain what inheritance is and give an example of when you might use it?  1
Tell about WebService in Asp.Net? Accenture4
Why Global.asax is used? Perot-Systems5
.net allows which inheritence AG-Technologies5
If you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler?  1
Can we Run the Application without Build Emphasis2
Usage of web.config? Microsoft1
About duration in caching technique ? Accenture2
What is the namespace for encryption? Astadia1
When during the page processing cycle is ViewState available?  1
Contrast the use of an abstract base class against an interface?  4
 
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