6 State Management On Asp Net Core Application

NET Centric Computing · Unit 6 · 4 hrs

State Management on ASP.NET Core Application

Exam-focused notes for State Management on ASP.NET Core Application (NET Centric Computing, CSC378): what the TU syllabus asks and how it has actually been tested, with 6 solved past questions from this unit.

What this unit covers

  • State Management on stateless HTTP
  • Server-side strategies: Session State, TempData, Using HttpContext, Cache
  • Client-side strategies: Cookies, Query Strings, Hidden Fields

Client-side strategies

20815 marks

Define state management. Explain the parts of state management on the client side. [5]

State management is the process of preserving and maintaining the state (data/information) of a user or application across multiple HTTP requests. Since HTTP is a stateless protocol, each request is treated as independent and the server does not automatical...

Full solved answer →

State Management on stateless HTTP

208010 marks

How do you manage state on stateless HTTP? How do you validate form using JQuery? Describe with your own assumptions.[10]

HTTP is a stateless protocol, meaning each request from a client to the server is independent. The server does not remember any previous request. However, real-world web applications (like shopping carts, login sessions, etc.) need to remember user data acr...

Full solved answer →
207810 marks

What are the advantages of stateless HTTP in ASP.NET core application? Create a method to insert a record (3, 'John', 12000) onto the table Employee having fields EmployeeId(int), Name varchar(200), Salary(int) using Entity Framework.[10]

- Record to insert: (3, 'John', 12000) - Table: Employee - Fields: EmployeeId (int), Name (varchar(200)), Salary (int) --- HTTP is a stateless protocol: each request is independent and the server keeps no memory of previous requests. This gives ASP.NET Core...

Full solved answer →

Server-side strategies

20785 marks

Give an example to manage the session state. [5]

Session State is an ASP.NET Core mechanism to store user data while the user browses the application. It uses a store maintained by the application to carry on data across requests from a client. ASP.NET Core maintains the session state by providing a cooki...

Full solved answer →
20765 marks

Explain about request object and session object in ASP.[5]

--- The Request Object in ASP.NET is part of the HttpContext object, which holds information about the current HTTP request. Whenever a new HTTP request is made, the HttpContext object is created, capturing the current state of that HTTP request and respons...

Full solved answer →
20765 marks

Differentiate between application object and server object in ASP.[5]

--- Basis Application Object Server Object --------- Definition The Application object is used to store and share information that is accessible to all users across the entire web application. The Server object provides properties and methods that are usefu...

Full solved answer →