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

Top 5 Contributors of the Month
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
NetworkingAptitudeOthers  All    

ASP.Net Interview Questions and Answers

What is the concept of Postback in ASP.NET.

Author: Ashutosh Jha          Posted Date: August 01, 2014    Category: ASP.Net     Points: 40

A postback is a request sent from a client to server from the same page user is already working with.

ASP.NET was introduced with a mechanism to post an HTTP POST request back to the same page. It's basically posting a complete page back to server (i.e. sending all of its data) on same page. So, the whole page is refreshed.

How to validate the listbox for the duplicate values from textbox.

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

It can be done like below-

on the button click event of your add button you can check, if the already entered value and the textbox values are same or not. if both are same, don't allow it else write the new value like below-

foreach(listItem item in ListBox.Items)
if(Item.Text != txtbox1.Text)
//add the new value;

What is cross page posting in asp.net

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

Whenever, you need to deal with the first webpage's control value to different pages of your application , you can do this with cross page posting. So, cross page posting enables you to post the WebPage and WebPage's control values to another WebPage in your asp.net applications.

There are two ways we can use cross page postsbacks in ASP.NET

Suppose you have some controls like textboxes, labels and one button on your first page -
ID="Button2" runat="server"
Text="Submit Page to secondpage.aspx"
PostBackUrl="~/secondpage.aspx" />

use PostBackUrl and assign the url of second page.
Now on the second page, using PreviousPage property you can receive those values of controls from your first page.

What is web.config file in asp.net

Author: Ashutosh Jha          Posted Date: July 29, 2014    Category: ASP.Net     Points: 40

Web.config is the main settings and configuration file for an ASP.NET web application. The file is an xml document that defines configuration information regarding the web application.This file stores the information about how the web application will act.

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)


- 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


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" />

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
« Previous12345678910….5556Next »

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