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

Top 5 Contributors of the Month
Ashutosh Jha
Imran Ghani

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 difference among Errors, Warnings and Messages which Visual Studio shows?

Author: ASPEvil          Posted Date: August 31, 2014    Category: ASP.Net     Points: 40

Errors are fatal error, which for, the ASP.Net page code is not getting converted to the MSIL code.

Warnings are non-fatal error which do not oppose ASP.Net page code to be converted to the MSIL, but if these warnings
could be resolved, then it would be perfect and Visual Studio can co-operate to resolve these warnings.

Messages are the text/string messages which IIS generates, at the time of page building which programmer can include in the page.

How you will validate that the selected date from date picker is Monday.

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

first save the date in string like below-

DateTime selecteddate = Convert.ToDateTime(Txtfromdate.SelectedDateValue.ToString());

and then check for monday

if (selecteddate.DayOfWeek != DayOfWeek.Monday)
lblmsg.Text = "Yo must select the monday date only";

What is Session in ASP.NET

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

Session is one of the server side state management techniques where the a unique client id gets generated for the first request from the client and maintained during the session with the server. Each tie the request sends to the server with the session id, the server checked if the session id is live,it respond back to h client with the the required details.
There are 2 types of sessions:
1. InProc session: When the session is stored in the process memory of the browser, the session is called as the Inproc session.In this session, when the browser is closed, the session data gets vanished.
2. OutProc Session: When the session is maintained out of the process memory of the browser, it is called as OutProc session. In this case, the session is maintained outside in a separate server so that if the browser is closed, then also session will be maintained.

What is the difference between authentication and authorization?

Author: ASPEvil          Posted Date: August 30, 2014    Category: ASP.Net     Points: 40

With the login page, when we put our userid and password and click the submit button, then the combination of that entered
userid and password is sent to the server and then server checks if that combination is existing with the server or not. This process
is called the authentication.

After the authentication is completed, if the server found the userid and password combination is true, the server redirect the user
to his/her allocated page. For example: if the user is an ordinary user, then the user is sent to the user dashboard and if the user is the admin, then he/she is sent to the admin panel. This process is called the authorization.

what is main difference between IIS and ASP.Net development server(Cassini)?

Author: ASPEvil          Posted Date: August 30, 2014    Category: ASP.Net     Points: 40

IIS does not lock the page while it is running the page. But Cassini lock the page
on the Visual Studio, while it is running the same page.

IIS is a service and hence it is required to register an user with the Operating System (Windows). Since cassini
is an application, it does not reqiure any user registration with the Operating System(Windows).

How xhtml is related to ASP.Net?

Author: ASPEvil          Posted Date: August 30, 2014    Category: ASP.Net     Points: 40

When ASP.Net makes the output of ASP.Net pages, those outputs are in xhtml.

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

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