ASP.NET Interview Questions and Answers (1544) - Page 21

what is PrePageExecute() event

By overrriding the PrePageExecute Method you can subscribe to the page's InitComplete Event and inject dependencies into any UserControl's found on the page at that time. Since the MasterPage is a UserControl, this includes the MasterPage as well if there is one.
What is Authentication and Authorization.

An authentication system is how you identify yourself to the computer. The goal behind an authentication system is to verify that the user is actually who they say they are.
Once the system knows who the user is through authentication, authorization is how the system decides what the user can do.
How do you validate the controls in an ASP.NET page?

Using special validation controls such as Range Validator, Email Validator we can validate the controls in ASP.NET page.
What is smart navigation?

The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.It is called smart navigation.
How to manage pagination in a page?

Using pagination option in DataGrid control. We have to set the number of records for a page, then it takes care of pagination itself.
How ASP .NET different from ASP?

In ASP.NET Scripting is separated from the HTML, Code is compiled as a DLL,
these DLLs can be executed on the server.
What is the use of profiles in ASP.NET?

ASP.NET provides profile feature to keep track of user data. Although a profile is similar to session state object, it persists between user session as it is stored in a database.

For example we can use profiles we can keep track of the products ordered by an user in an shopping application and when the user starts a new session, you can display those products in a "ordered items" listbox.
What are the different states in ASP.NET?

view state
session state
application state
how many type can maintain state at server side ?

NOTE: This is objective type question, Please click question title for correct answer.
Whether javascript in the aspx(inline javascript) requires to compile each time for every modification?

Not necessary just saving the aspx file and refreshing the browser is enough to get the updations
Whether we can use vbscript and javascript combination for validation?

No, we can't use them together, since the compilers are different.
To create a excel file using COM. Whether we need to change any dcom configuration?

Yes we need to give the proper rights to the ASPNET user
What is Multi-Targeting in .net?

In the previous version of Visual Studio, each Visual Studio release supports to a specific version of the .NET Framework. For example, VS 2002 only worked with .NET 1.0, VS 2003 only worked with .NET 1.1, and VS 2005 only worked with .NET 2.0.

Now with the major change in VS2008 is to support "Multi-Targeting "
Visual Studio 2008 is used to create projects that target .NET Framework version 2.0, 3.0, or 3.5. is what we call as "Multi-Targeting".
Difference between DropDownList and ListBox in ASP.NET

The basic difference between DropDownList and ListBox in ASP.NET are following

1. Only one items of DropDownList is visible when it renders on the page. More than one item of the ListBox is visible when it renders on the page.
2. Only one item can be selected in DropDownList. More than one item can be selected in Listbox provided SelectionMode is Multiple as in the below code snippets.

Both controls are rendered as "<select>" html tag in the HTML.

DROPDOWNLIST
<asp:DropDownList ID="drop1" runat="server">

<asp:ListItem Text="One" Value="1" />
<asp:ListItem Text="Two" Value="2" />
</asp:DropDownList>


For more details on DropDownList click http://www.dotnetfunda.com/tutorials/controls/dropdownlist.aspx

LIST BOX
 <asp:ListBox ID="list1" runat="server" SelectionMode="Multiple">

<asp:ListItem Text="One" Value="1" />
<asp:ListItem Text="Two" Value="2" />
</asp:ListBox>


For more details on ListBox click http://www.dotnetfunda.com/tutorials/controls/listbox.aspx

Thank you.
How to Avoid the tempering of your page's viewstate ?

using EnableViewStateMac="true" in the page directive in the HTML !!
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories