What is the difference between the iscallback attribute and the ispostback attribute?

Source: Internet
Author: User

In ASP. net2.0, what is the difference between the iscallback attribute of page and the ispostback attribute? Please give me a detailed answer. I 'd better explain it with an example. I really don't understand the. NET framework2.0 SDK in English!
Feedback
# View the reply reference on the first floor
By James Chen
It should be clearly written in msdn. You only need to understand what is PostBack and what is callback. However, the official callbackeventhandler interface definition is changed, which is different from that of the beta version. I am also confused about the integration and implementation of the callback function on the webpage.
If the client interacts with the server in PostBack mode, ispostback is true.
If the client interacts with the server in the callback mode, iscallback is true.
The default method is PostBack. The callback method requires a lot of JavaScript writing.Code.

PostBack:
In the default model for ASP. net web pages, the user interacts with a page and clicks a button or performs some other action that results in a PostBack. the page and its controls are re-created, the page code runs on the server, and a new version of the page is rendered to the browser.

callback:
in a client callback, a client script function sends a request to an ASP. net web page. the web page runs a modified version of its normal life cycle-the page is initiated and its controls and other members are created, and then a specially marked method is invoked. the method performs the processing that you have coded and then returns a value to the browser that can be read by another client script function. throughout this process, the page is live in the browser.
# on the second floor, [the landlord] Reply to the reference.
by only you
@ James Chen

after reading your answers, I know a lot about it. If ispostback is set to true, the page must be regenerated for any changes. When iscallback is true, it seems that the client script is running. Although the page changes, it does not refresh. However, writing client scripts is really a very complicated task !!!
have you seen atlas? That framework provides a lot of controls to achieve the same feeling of Ajax, does it also use the iscallback of page?
# view the reference on the third floor
by James Chen
you did a good job. The PostBack method refreshes the entire page, while the callback method does not refresh the entire page. However, callback cannot be equivalent to Ajax. It is said that the implementation principles of the two are different. Callback can only transmit parameters of the string type, while Ajax uses the httprequest + XML mechanism. I have never seen atlas, but it is a real Ajax library in the. NET environment. I didn't see it because su Peng's Ajax webcast hasn't talked about it yet. I didn't hear whether it was officially release.
# reply to reference on the 4th floor
by blueknight
Why does callbackeventhandler seem not supported in Firefox?
# reply to reference on the 5th floor
by Guo Pingchuan [unregistered user]
ispostback judgment page and whether to load for the first time
callback, asynchronous Communication

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.