TAILIEUCHUNG - ASP.NET 4 Unleased - p 132

Maintaining Application State In Listing , a DataView object is stored in Session state. When you sort the GridView control, the DataView is sorted. The page in Listing includes a link that enables you to reload the page. The sort order of the records displayed by the GridView is remembered across page requests. The sort order is remembered even if you navigate to another page before returning to the page. Using the Session Object The main application programming interface for working with Session state is the HttpSessionState class. This object is exposed by the , , , , and . | 1284 CHAPTER 28 Maintaining Application State form body html In Listing a DataView object is stored in Session state. When you sort the GridView control the DataView is sorted. The page in Listing includes a link that enables you to reload the page. The sort order of the records displayed by the GridView is remembered across page requests. The sort order is remembered even if you navigate to another page before returning to the page. Using the Session Object The main application programming interface for working with Session state is the HttpSessionState class. This object is exposed by the and properties. This means that you can access Session state from just about anywhere. This HttpSessionState class supports the following properties this is not a complete list CookieMode Enables you to specify whether cookieless sessions are enabled. Possible values are AutoDetect UseCookies UseDeviceProfile and UseUri. Count Enables you to retrieve the number of items in Session state. IsCookieless Enables you to determine whether cookieless sessions are enabled. IsNewSession Enables you to determine whether a new user session was created with the current request. IsReadOnly Enables you to determine whether the Session state is read-only. Keys Enables you to retrieve a list of item names stored in Session state. Mode Enables you to determine the current Session state store provider. Possible values are Custom InProc Off SqlServer and StateServer. SessionID Enables you to retrieve the unique session identifier. Timeout Enables you to specify the amount of time in minutes before the web server assumes that the user has left and discards the session. The maximum value is 525 600 1 year . The HttpSessionState object also supports the following methods Abandon Enables you to end a user session. Clear Enables you to clear all items from Session state. Remove Enables you to remove a .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.