locked
Define and Describe the differences between IsPostBack, AutoPostBack, CrossPostBack RRS feed

  • Question

  • User2061024676 posted

    Define and Describe the differences between IsPostBack, AutoPostBack, CrossPostBack??? Please provied with illustrated examples.

    Thursday, November 24, 2011 5:50 AM

Answers

  • User960609757 posted


    postback
    A postback is initiated by the browser, and reloads the whole page, usually when a control on the page (e.g. a button) is changed.

    example : http://www.java2s.com/Code/ASP/Page/PageIsPostBackDemoC.htm

    AutoPostback
    With some controls (e.g. dropdownlist,Checkboxes), you choose if changing the control should result in a postback. This property is called AutoPostback.

    Controls that support AutoPostback includes:

        List item
        ListControl
        BulletedList
        CheckBoxList
        DropDownList
        ListBox
        RadioButtonList
        CheckBox
        TextBox

    example : http://asp-net-example.blogspot.com/2009/03/how-to-use-dropdownlist-autopostback.html


    Cross Page PostBack
    A web form to post-back to a different web form (other than itself)

    How to post to a different page

    To set a web form to post back to a different web form, in the source web form, set the PostBackURL property of a control that implements IButtonControl (eg. Button, ImageButton, LinkButton) to the target web form. When the user clicks on this button control, the web form is cross-posted to the target web form. No other settings or code is required in the source web form.

    example : http://www.c-sharpcorner.com/UploadFile/DipalChoksi/xpgpostbk_asp2_dc08102006235543PM/xpgpostbk_asp2_dc.aspx


    callback
    A callback is initiated by java script in the page, and can load/update parts of the page

    A method which is invoked when a certain event occurs such as clicking on a button. It also could have another meaning that a page performs a request back to the server (such as an AJAX request).

    example : http://msdn.microsoft.com/en-us/library/ms178210.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 28, 2011 7:56 AM

All replies

  • User-1360095595 posted
    You should be able to find all this information with a simple google/bing search. This homework is not very hard.
    Thursday, November 24, 2011 5:53 AM
  • User960609757 posted


    postback
    A postback is initiated by the browser, and reloads the whole page, usually when a control on the page (e.g. a button) is changed.

    example : http://www.java2s.com/Code/ASP/Page/PageIsPostBackDemoC.htm

    AutoPostback
    With some controls (e.g. dropdownlist,Checkboxes), you choose if changing the control should result in a postback. This property is called AutoPostback.

    Controls that support AutoPostback includes:

        List item
        ListControl
        BulletedList
        CheckBoxList
        DropDownList
        ListBox
        RadioButtonList
        CheckBox
        TextBox

    example : http://asp-net-example.blogspot.com/2009/03/how-to-use-dropdownlist-autopostback.html


    Cross Page PostBack
    A web form to post-back to a different web form (other than itself)

    How to post to a different page

    To set a web form to post back to a different web form, in the source web form, set the PostBackURL property of a control that implements IButtonControl (eg. Button, ImageButton, LinkButton) to the target web form. When the user clicks on this button control, the web form is cross-posted to the target web form. No other settings or code is required in the source web form.

    example : http://www.c-sharpcorner.com/UploadFile/DipalChoksi/xpgpostbk_asp2_dc08102006235543PM/xpgpostbk_asp2_dc.aspx


    callback
    A callback is initiated by java script in the page, and can load/update parts of the page

    A method which is invoked when a certain event occurs such as clicking on a button. It also could have another meaning that a page performs a request back to the server (such as an AJAX request).

    example : http://msdn.microsoft.com/en-us/library/ms178210.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 28, 2011 7:56 AM