.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Jean Paul
ASPEvil
SP
satyapriyanayak
Ashutosh Jha


Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.


Post New Question Subscribe to Interview Questions
 
Quick Links For Interview Questions Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  OOPs  JQuery  JavaScript/VBScript
BiztalkPatten/PracticesIISWCFWPFWWF
NetworkingAptitudeOthers  All    
 

ASP.Net Interview Questions and Answers

What is the difference between web.config and global.asax?

Author: ASPEvil          Posted Date: July 24, 2014    Category: ASP.Net     Points: 40

web.config:- It is a xml based file.
glbal.asax:- It is class file.

web.config:- It carries configuration data of the ASP.Net website.
global.asax:- It carries application events of the ASP.Net website.

web.config:- If there will be any change made on this file, we need to just save the new file with the ASP.Net website.
global.asax:- If there will be any change made on this file, we need to compile/rebuild the ASP.Net website.

machine.config is available with ASP.Net website?

Author: ASPEvil          Posted Date: July 24, 2014    Category: ASP.Net     Points: 40

Actually, it is not available with ASP.Net website's own directory/folder, but on which machine/computer, it is being developed Or on which web server, it is running; a machine.config file is there and this machine.config file's setting has a strong impact on the setting of that ASP.Net website.

What is the difference between ViewState,Application and Session of a Page?

Author: abhays          Posted Date: June 14, 2014    Category: ASP.Net     Points: 40

View State:

- View state is maintained in page level only.
- View state of one page is not visible in another page.
- View state information stored in client only.
- View state persist the values of particular page in the client (browser) when post back operation done.
- View state used to persist page-instance-specific data. (Read more)

Session State:

- Session state is maintained in session level.
- Session state value is available in all pages within a user session.
- Session state information stored in server.
- Session state persist the data of particular user in the server. This data available till user close the browser or session time completes.
- Session state used to persist the user-specific data on the server side. (Read more)

Application State

ApplicationState is a variable you can store values in during the life off the application (may get cycled periodically, and without your knowledge) (used less-frequently)


Usage

- If you want to access the information on different web pages, you can use SessionState
- If you want to access from the same page, then you can use Viewstate
-Application State it's global, for all users

Security

Session state provides more security when compared with view state as the data value is stored in server side

In which event are the controls fully loaded

Author: Ashutosh Jha          Posted Date: March 31, 2014    Category: ASP.Net     Points: 40

Page load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that view state is not fully loaded during this event.

How to set bullet in paragraph in asp.net

Author: Ashutosh Jha          Posted Date: March 30, 2014    Category: ASP.Net     Points: 40


<p>Example of bullets</p>
<asp:Bulletedlist id="bl1" runat="server">
<asp:ListItem Value="Item 1" />
<asp:ListItem Value="Item 2" />
</asp:Bulletedlist>

what are the list the events in page life cycle.

Author: Ashutosh Jha          Posted Date: March 30, 2014    Category: ASP.Net     Points: 40

Below is the list of page life cycle in asp.net-
1) Page_PreInit
2) Page_Init
3) Page_InitComplete
4) Page_PreLoad
5) Page_Load
6) Page_LoadComplete
7) Page_PreRender
8)Render

what is application state in asp.net

Author: volvo          Posted Date: December 21, 2013    Category: ASP.Net     Points: 40

ASP.NET allows you to save values using application state, a global storage mechanism that is accessible from all pages in the Web application. Application state is stored in the Application key/value dictionary. Once you add your application-specific information to application state, the server manages it, and it is never exposed to the client. Application state is a great place to store information that is not user-specific. By storing it in the application state, all pages can access data from a single location in memory, rather than keeping separate copies of the data. Data stored in the Application object is not permanent and is lost any time the application is restarted.
ASP.NET provides three events that enable you to initialize Application variables (free resources when the application shuts down) and respond to Application errors:

a.Application_Start: Raised when the application starts. This is the perfect place to initialize Application variables.

b.Application_End: Raised when an application shuts down. Use this to free application resources and perform logging.

c.Application_Error: Raised when an unhandled error occurs. Use this to perform error logging.

Example :
// This sets the value of the Application Variable

Application["Name"] = txtName.Text;

Response.Redirect("WebForm5.aspx");

// This is how we retrieve the value of the Application Variable

if( Application["Name"] != null )

How can you ensure that only authorized users access your Web service?

Author: Vanitha          Posted Date: December 06, 2013    Category: ASP.Net     Points: 40

You should use the <authorization> element to ensure that only authorized users access your Web service. This element allows or denies access to your Web service according to their role.


Mention the namespace that you must import in code to build a Web service.

Author: Vanitha          Posted Date: December 06, 2013    Category: ASP.Net     Points: 40

System.Web.Services is the elementary namespace, which must be imported to develop code of a Web service.

What advantages have Web services over Component Object Model (COM) and Distributed Component Object Model (DCOM)?

Author: Vanitha          Posted Date: December 06, 2013    Category: ASP.Net     Points: 40

The advantages of Web services over COM and DCOM are as follows:


Web services are simple to use and can be implemented on varied platforms.
Web services are loosely coupled; as a result, their interfaces and methods can be extended.
Web services do not carry any state information with them so that multiple requests can be processed simultaneously.
« Previous12345678910….5556Next »



Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend