TAILIEUCHUNG - Dealing with Stateless Programming

Đối phó với không quốc tịch Lập trình Một trong những khác biệt lớn nằm trong thực tế là các trang Web vẫn còn vốn không quốc tịch. Điều này có nghĩa rằng khi bạn di chuyển từ trang này sang trang, bạn có xu hướng bị mất những dữ liệu mà các trang sử dụng. | Dealing with Stateless Programming One of the big differences lies in the fact that Web pages are still inherently stateless. This means that when you move from page to page you tend to lose the data that the pages use. Although this is not a big problem when you are creating simple Web pages that perform easy tasks when you begin creating real applications especially dealing with databases or data that users input this factor can be a big hassle. State Management on the Client In the past the statelessness of Web pages was dealt with to an extent in a number of ways on the client side Cookies. Small files that a Web application creates. Cookies store data on the local machines of those who are accessing the Web application. A couple of problems exist with just using cookies. First cookies are stored on the local machine so the machine or browser must allow them. Second the type of data that can be stored in cookies is limited. Query strings. Information that is appended to the end of a page s URL. You will see examples of this when you re creating hyperlinks and calling new Web pages. Hidden fields. An HTML field that is hidden to the user. These are not visible to the class module either. property. Provides a dictionary object for retaining values between multiple requests for the same page. Note that this is the method that the page uses to preserve page and control property values between round trips. Although some of these management techniques have been used in ASP they are still valid in .NET and they are useful given the correct circumstances. When you re developing in some additional solutions are available for state management. Those solutions are handled on the server side. Server-Side Solution to State Management Depending on the information that you want to retain .NET has a number of ways to handle state management. Although you could use the methods just mentioned a few other options are available as well Application state.

Đã 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.