asp.net state management

The fourth week day1
saw Zhang Fuping teacher recorded ispostback bombs and small box of knowledge today, feel yourself early learning associated with the current contents of it. The first is the use of ispostback, page.ispostback is used to determine whether the page is first loaded, is used in a large number of state management of learning before. There are state management session state, view state, cookles and application state.
First we look at the view state, BulletedList control is able to create a bulleted list of
Here Insert Picture Descriptionexamples of the type of list, and its value is put into the viewstate which
will be refreshed after clicking the button, a new page, and will not remember entries in content, viewstate remember, so he was taken out first and then update the assignment inside the viewstate data viewstate let bulletedlist data-bound list inside, and then displayed in databind function. Return the same page!
Here Insert Picture Descriptioncookles use:
Here Insert Picture DescriptionSession state: Analogue view state, will be different in the same browser window recorded for the same user, and view status only in the same window
Here Insert Picture Descriptionapplication: contrast conversation view, for different users with different browsers test, record your input will be more powerful
Here Insert Picture Description
when it comes to play the box, think of alert and prompt
Here Insert Picture Description
method in the implementation of alert, the code will stop there, and second method can effectively solve this problem, this time to think of the response object to call flush method, part of the cache to complete the first show, detailed look at the effect https://blog.csdn.net/weixin_43704007/article/details/104363176

Published 37 original articles · won praise 0 · Views 721

Guess you like

Origin blog.csdn.net/weixin_43704007/article/details/104605476