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


Top 5 Contributors of the Month
abhays
Clintonzz
mattyclown
cathyhill345
arronlee


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

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.

How can you prevent your Web services from unauthorized access?

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

The following are the ways to prevent your Web service from unauthorized access:


Using encryption and message-based security.
Using authentication and access controls for the Web service.

Describe the EventLog class.

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

The EventLog class is used to access the Windows event logs from Windows services. Using EventLog, you can also customize Windows event logs that record information about important software and hardware events, such as the events of the .NET controls, keyboard, or other hardware devices.

The EventLog class allows you to read or write to event logs, delete logs, and create as well as delete event sources. You can use the EventLog class to create event logs while creating an event source. An event source can be used to write to only one event log at a particular time. However, it is possible to associate one event log to multiple sources.

What is Page directive?

Author: volvo          Posted Date: November 30, 2013    Category: ASP.Net     Points: 40

Page directive is the code present at the top of the every ASP.NET page with .aspx extension. It contains instructions about the page execution and optional settings.
Syntax for declaring a page directive:

<%@ Page Title="ASP.NET" Language="C#" AutoEventWireup="true" CodeFile="asp.aspx.cs" Inherits="QuesandAns" %>


« Previous12345678910….5556Next »



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