โ† All MCTS Flashcard Decks

ASP.NET Web Applications Flashcards

7 cards from real MCTS practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 ASP.NET Web Applications flashcards as text
  1. Which ASP.NET MVC HTML helper renders a drop-down list bound to a collection of SelectListItem objects?

    Answer: Html.DropDownList()

    Html.DropDownList() renders an HTML element and accepts a collection of SelectListItem objects to populate the options.

  2. In ASP.NET Web Forms, which property of a SqlDataSource control specifies the SQL statement used to retrieve data?

    Answer: SelectCommand

    The SelectCommand property of SqlDataSource holds the SQL SELECT statement (or stored procedure name) executed when the data source retrieves data for bound controls.

  3. What does the [Authorize] attribute do when applied to an ASP.NET MVC action method?

    Answer: It restricts access to authenticated users and optionally to specific roles or users

    [Authorize] prevents unauthenticated users from accessing the action method and can additionally restrict access by specifying Roles or Users parameters.

  4. Which ASP.NET session state mode stores session data in a separate Windows service process, surviving application pool recycles?

    Answer: StateServer

    StateServer mode stores session data in the ASP.NET State Service (aspnet_state.exe), which is independent of the IIS worker process and persists through application pool recycles.

  5. In ASP.NET MVC, what is the purpose of TempData?

    Answer: To pass data between controller actions that survives a single redirect

    TempData stores data in the session for exactly one subsequent request, making it ideal for passing messages or data across a redirect-after-post pattern.

  6. Which IIS feature must be enabled for ASP.NET URL routing without file extensions to work correctly?

    Answer: runAllManagedModulesForAllRequests setting or extensionless URL routing

    Setting runAllManagedModulesForAllRequests to true in web.config or configuring extensionless URL routing ensures IIS passes requests without file extensions to the ASP.NET pipeline for route matching.

  7. What is the purpose of the Entity Framework DbContext class in an ASP.NET application?

    Answer: It represents a session with the database and is used to query and save entity instances

    DbContext is the primary class in Entity Framework that coordinates entity object persistence, tracking changes, and translating LINQ queries to SQL against the configured database.