โ† 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. In ASP.NET MVC, which filter type runs before and after controller action methods and can short-circuit the pipeline?

    Answer: Action filters

    Action filters implement IActionFilter and provide OnActionExecuting and OnActionExecuted hooks that wrap action method execution and can cancel the request.

  2. Which ASP.NET configuration element is used to define custom error pages for specific HTTP status codes?

    Answer: in system.web

    The element in system.web allows you to specify redirect URLs for specific HTTP error status codes such as 404 or 500.

  3. What does the ValidateAntiForgeryToken attribute protect against in ASP.NET MVC?

    Answer: Cross-site request forgery (CSRF) attacks

    ValidateAntiForgeryToken verifies a hidden token in form submissions matches a cookie token, preventing malicious third-party sites from submitting forms on behalf of authenticated users.

  4. Which ASP.NET class provides access to the current user's identity and roles within a request?

    Answer: HttpContext.User

    HttpContext.User exposes an IPrincipal object containing the current user's IIdentity and role memberships as set by the authentication module.

  5. In ASP.NET Web Forms, which event in the page lifecycle fires last before the HTML is rendered to the browser?

    Answer: Page_PreRender

    PreRender is the last event before rendering where you can make final changes to the page or controls before their HTML output is generated.

  6. Which method on the UpdatePanel control's AsyncPostBackTrigger allows you to specify which control event initiates a partial-page update?

    Answer: ControlID and EventName properties

    AsyncPostBackTrigger uses the ControlID property to identify the triggering control and EventName to specify which event on that control initiates the async postback.

  7. What is the purpose of the RouteConfig class in an ASP.NET MVC application?

    Answer: It registers URL routing rules that map URLs to controller actions

    RouteConfig.RegisterRoutes() is called at application startup to define URL patterns and their mappings to controller and action names in the route table.