ASP.NET Web Forms Interview Questions

Want to become an expert in cracking ASP.NET Web Forms interview questions?

Start with practicing the questions below. Whether a question involves multiple choice or live coding, we will give you hints as you go and tell you if your answers are correct or incorrect.

After that, take our timed public ASP.NET Web Forms Interview Questions Test.

To use our service for testing candidates, buy a pack of candidates.


1. Input Controls
ASP.NET Web Forms Web controls Public

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?

Easy  
2min
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
ASP.NET Web Forms Managing state Public

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

Easy  
2min
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
ASP.NET Web Forms Optimizations Public

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

Hard  
2min
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
ASP.NET Web Forms Life Cycle Public New

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

Hard  
2min
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, HTML/CSS, JavaScript, C#, and SQL Online Test (Easy / Hard)
Not exactly what you are looking for? Go to our For Jobseekers section.