ASP.NET Web Forms Interview Questions

Practice for ASP.NET Web Forms interviews by solving TestDome questions. Our interview questions are used by more than 5,000 companies and 450,000 individual test takers.

Jobseekers: Certify Your Knowledge

Take a Certification Test

Companies: Use Our Tests for Screening

Buy a Pack Of Candidates

Try to solve 4 ASP.NET Web Forms interview questions below. Hints can help you find answers to questions you are having trouble with.

1. Input Controls

Web controls
   
Easy  

An ASPX page contains the following snippet:

<asp:TextBox ID="Name" runat="server" />
<br />
<input id="Surname" type="text" />

Which of the following statements are true?

(Select all acceptable answers.)

Before being sent to the web browser, <asp:TextBox> is converted to an <input> element.
The content of the element Name is accessible from the code behind as Name.Text.
The content of the element Surname is accessible from the code behind as Surname.Text.
When the page is sent to a web browser, element name will have id "Name".
When the page is sent to a web browser, element surname will have id "Surname".
   


2. State

Managing state
   
Easy  

Which of the following statements are true for managing the state between two web calls?

(Select all acceptable answers.)

Data written to the Session will be accessible from other pages on our site.
Data written to the ViewState will be accessible from other pages on our site.
The size of the HTML page will depend on the data we store in ViewState.
The size of the HTML page will depend on the data we store in Session.
If a user opens one page in two different tabs, each tab will have its own version of Session.
If a user opens one page in two different tabs, each tab will have its own version of ViewState.
   


3. Bundling

Optimizations
   
Hard  

Which of these statements are true for bundling in ASP.NET Web Forms?

(Select all acceptable answers.)

By default, bundling is disabled in debug mode.
A link produced by <webopt:bundlereference runat="server" path="~/Content/css" /> will be constant through the project lifetime.
There are different classes for minifying JavaScript and for minifying CSS.
Bundling will set Cache-Control to no-cache.
Bundle.Include(virtualPath) method can accept some forms of wildcard (*) syntax.
   


4. Redirect

Life Cycle
   
Hard  

We want to switch a user from page X to page Y. Which of the following statements are true?

(Select all acceptable answers.)

Server.Transfer will update the web browser's URL to Y.
Response.Redirect will update the web browser's URL to Y.
Response.Redirect will produce more web requests than Server.Transfer.
Server.Transfer can be used for transferring to a page on another server.
   


If you feel ready, take one of our timed public ASP.NET Web Forms Interview Questions tests:
ASP.NET Web Forms

ASP.NET Web Forms, HTML/CSS, JavaScript, C#, and SQL Online Test (Easy / Hard)

Not exactly what you are looking for? Go to our For Jobseekers section.