是什么Page.IsPostBack和Page.IsCallBack之间的区别? [英] What is the difference between Page.IsPostBack and Page.IsCallBack?

查看:529
本文介绍了是什么Page.IsPostBack和Page.IsCallBack之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近遇到了一些code,检查 Page.IsCallBack ,但我不知道它是如何不同于页.IsPostBack 。任何人都可以告诉我吗?

I've recently ran into some code that checks Page.IsCallBack but I wasn't sure how it is different from Page.IsPostBack. Can anyone enlighten me?

修改:他们是相互排斥的,也可以在特定情况下发生都在同一时间

Edit: Are they mutually exclusive or can both occur at the same time in a given situation?

推荐答案

Page.IsCallBack

有越来越指示页面请求是否是一个回呼的结果的值。它是一种特殊的回传,这样一个来回总是发生;然而,不像经典回发,该脚本回调不重绘整个页面。 的ViewState不更新的回调过程中,它是为回发。

It is getting a value indicating whether the page request is the result of a call back. Its a special postback, so a round-trip always occurs; however, unlike the classic postback, the script callback doesn't redraw the whole page. ViewState is not updated during a callback, it is for postback.

Page.IsPostBack

检查页面是否被访问服务器的第一次或没有。不像IsCallBack,ViewState的更新

Checks whether the Page is accessing the server for the first time or not. Unlike the IsCallBack, the ViewState is updated

请参照<一个href=\"http://edndoc.esri.com/arcobjects/9.2/net_server_doc/developer/adf/pagepost_clientcall.htm\">Page对于更详细的生命周期,显示出事件的顺序图

Refer to Page Life Cycle for more detail that shows a diagram illustrating the sequence of events

编辑 - :要回答你的新问题

Page.IsPostBack属性将两种请求类型返回true。只有当请求是客户端回调的Page.IsCallback属性将返回true

Page.IsPostback property will return true for both request types. The Page.IsCallback property will return true only when the request is a client callback

这篇关于是什么Page.IsPostBack和Page.IsCallBack之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆