locked
Update panel does the full postback RRS feed

  • Question

  • User828542847 posted

    i have questions on Update panel.

    1) people often use Update panel as a result when postback occur then flicker does not happen. so i am curious to know Update panel is fully ajax or just a eye wash ?

    2) Update panel use xmlhttp for calling server side function ?

    3) when we click button inside Update panel then what happen internally....partial postback like jquery ajax or full postback occur but cleverly gives partial postback feeling to use ?

    please share the info about Update panel like how it works or is it really ajax or fake.

    Wednesday, July 12, 2017 2:22 PM

Answers

  • User475983607 posted

    please share the info about Update panel like how it works or is it really ajax or fake.

    Yes  the Update Panel uses AJAX it is not fake - whatever that means...

    The openly published documentation clearly explains how the update panel works.  You should read it...

    https://msdn.microsoft.com/en-us/library/bb386454.aspx

    If for some reason you  don't believe the documentation and feel the update panel is fake, why don't you create a simple test.  Use developer tools (or a proxy like Fiddler) to view the request to see if it's AJAX or not.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 12, 2017 5:21 PM
  • User2053451246 posted

    When to use update panel and when to use jquery ajax because both use for ajax. Give me few scenarios.
    Update Panel: Uses AJAX.  For developers who need the drag-and-drop tools that Web Forms offer because they don't know how to write the code the controls are doing for them behind the scenes.  This then makes your page messier (because of view state), and therefore slower.

    jQuery AJAX: This isn't really a thing.  jQuery is a JavaScript library to simplify common JavaScript function, such as making an AJAX call.  For developers who know how to manually initiate an AJAX request and process the response.  Makes page cleaner.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 12, 2017 7:09 PM
  • User475983607 posted

    Update panel use jquery ajax or raw xmlhttp?

    You're mangling technology and data formats.

    AJAX stands for Asynchronous JavaScript and XML. It was named when XML was very populate but now JSON is the preferred data format.

    If you search google for update panel feedback then you see people are saying negative about update panel.

    When to use update panel and when to use jquery ajax because both use for ajax. Give me few scenarios.

    I prefer to use JQuery/AJAX and feel it is easier to use and I like JavaScript programming.  The decision to use AJAX or an Update Panel is totally up to you.  Keep in mind that an update panel is only available in ASP.Web Forms.  If you are building a Web Forms application and prefer the server control or you are not a strong JavaScript developer then an Update Panel is an easier path to take.  Plus an Update Panel exposes the entire page life cycle.  Did you by chance read the link in my previous thread? The doc goes over these points in detail.

    If you questioning why others "are saying negative about update panel." then I suggest you ask the folks making the comments. Otherwise, provide some kind of quantifiable benchmarks or requirements.  Making vague comparisons is not helpful and only leads to opinions which is not a constructive forum conversation.

    Try taking some time to learn and experiment as I suggested above.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 12, 2017 7:18 PM
  • User475983607 posted

    when we use jquery ajax then we can pass minimum data to server side and get our job done but you said update panel is used when you want to invoke the ASP web forms life cycle. if update panel is call series of function of page event then how could we say update panel is ajax ?

    AJAX is the term given to an HTTP request generated by JavaScript (XMLHttpRequest API).  The Update Panel is an ASP Web Forms server control that generates all the necessary JavaScript and HTML elements to provide Web Forms developers a consistent server control interface for replacing a portion of the DOM without requiring JavaScript programming skills.  The update panels uses AJAX to accomplish this which is clearly written in the update panel documentation linked in my previous thread.

    The problem you are facing is you are making assumptions on how technology works.   In this instance I think you are confusing AJAX with JSON.  Also, it seems you do not believe the Microsoft documentation and you are filling gaps in your understanding with personal assumptions. 

    how to determine that update panel is ajax or not from code. what to inspect to know that update panel is ajax ?

    All you have to do is read the openly published update panel documentation.  

    As I suggested above, create a basic test project to investigate the update panel. Use the browser's developer tools to view the HTTP request where you will see the request is an XMLHttpRequest.

    POST /admin/default.aspx HTTP/1.1
    Host: localhost:51867
    Connection: keep-alive
    Content-Length: 413
    Origin: http://localhost:51867
    Cache-Control: no-cache
    User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    X-Requested-With: XMLHttpRequest
    X-MicrosoftAjax: Delta=true
    Accept: */*
    Referer: http://localhost:51867/admin/default.aspx
    Accept-Encoding: gzip, deflate, br
    Accept-Language: en-US,en;q=0.8

    Also, you can easily see that only a portion of the DOM is updated.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 13, 2017 1:44 PM

All replies

  • User475983607 posted

    please share the info about Update panel like how it works or is it really ajax or fake.

    Yes  the Update Panel uses AJAX it is not fake - whatever that means...

    The openly published documentation clearly explains how the update panel works.  You should read it...

    https://msdn.microsoft.com/en-us/library/bb386454.aspx

    If for some reason you  don't believe the documentation and feel the update panel is fake, why don't you create a simple test.  Use developer tools (or a proxy like Fiddler) to view the request to see if it's AJAX or not.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 12, 2017 5:21 PM
  • User828542847 posted
    Update panel use jquery ajax or raw xmlhttp?

    If you search google for update panel feedback then you see people are saying negative about update panel.

    When to use update panel and when to use jquery ajax because both use for ajax. Give me few scenarios.
    Wednesday, July 12, 2017 6:07 PM
  • User2053451246 posted

    When to use update panel and when to use jquery ajax because both use for ajax. Give me few scenarios.
    Update Panel: Uses AJAX.  For developers who need the drag-and-drop tools that Web Forms offer because they don't know how to write the code the controls are doing for them behind the scenes.  This then makes your page messier (because of view state), and therefore slower.

    jQuery AJAX: This isn't really a thing.  jQuery is a JavaScript library to simplify common JavaScript function, such as making an AJAX call.  For developers who know how to manually initiate an AJAX request and process the response.  Makes page cleaner.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 12, 2017 7:09 PM
  • User475983607 posted

    Update panel use jquery ajax or raw xmlhttp?

    You're mangling technology and data formats.

    AJAX stands for Asynchronous JavaScript and XML. It was named when XML was very populate but now JSON is the preferred data format.

    If you search google for update panel feedback then you see people are saying negative about update panel.

    When to use update panel and when to use jquery ajax because both use for ajax. Give me few scenarios.

    I prefer to use JQuery/AJAX and feel it is easier to use and I like JavaScript programming.  The decision to use AJAX or an Update Panel is totally up to you.  Keep in mind that an update panel is only available in ASP.Web Forms.  If you are building a Web Forms application and prefer the server control or you are not a strong JavaScript developer then an Update Panel is an easier path to take.  Plus an Update Panel exposes the entire page life cycle.  Did you by chance read the link in my previous thread? The doc goes over these points in detail.

    If you questioning why others "are saying negative about update panel." then I suggest you ask the folks making the comments. Otherwise, provide some kind of quantifiable benchmarks or requirements.  Making vague comparisons is not helpful and only leads to opinions which is not a constructive forum conversation.

    Try taking some time to learn and experiment as I suggested above.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 12, 2017 7:18 PM
  • User828542847 posted

    how to use update panel when server side function return response in json format. in this kind of scenario people can use update panel. share some knowledge.

    Thursday, July 13, 2017 9:47 AM
  • User475983607 posted

    tapan2017

    how to use update panel when server side function return response in json format. in this kind of scenario people can use update panel. share some knowledge.

    Obviously, you have not taken enough time to learn the basic functionality of an update panel.  

    As stated above, an update panel is used when you want to invoke the ASP web forms life cycle. In other words, when you want to invoke event handlers in the code behind.

    Write an AJAX method in JavaScript/JQuery to communicate with a JSON service.  

    Thursday, July 13, 2017 11:09 AM
  • User828542847 posted

    yes you are right that i not very familiar with update panel.

    when we use jquery ajax then we can pass minimum data to server side and get our job done but you said update panel is used when you want to invoke the ASP web forms life cycle. if update panel is call series of function of page event then how could we say update panel is ajax ?

    how to determine that update panel is ajax or not from code. what to inspect to know that update panel is ajax ?

    please share your knowledge.

    Thursday, July 13, 2017 12:06 PM
  • User475983607 posted

    when we use jquery ajax then we can pass minimum data to server side and get our job done but you said update panel is used when you want to invoke the ASP web forms life cycle. if update panel is call series of function of page event then how could we say update panel is ajax ?

    AJAX is the term given to an HTTP request generated by JavaScript (XMLHttpRequest API).  The Update Panel is an ASP Web Forms server control that generates all the necessary JavaScript and HTML elements to provide Web Forms developers a consistent server control interface for replacing a portion of the DOM without requiring JavaScript programming skills.  The update panels uses AJAX to accomplish this which is clearly written in the update panel documentation linked in my previous thread.

    The problem you are facing is you are making assumptions on how technology works.   In this instance I think you are confusing AJAX with JSON.  Also, it seems you do not believe the Microsoft documentation and you are filling gaps in your understanding with personal assumptions. 

    how to determine that update panel is ajax or not from code. what to inspect to know that update panel is ajax ?

    All you have to do is read the openly published update panel documentation.  

    As I suggested above, create a basic test project to investigate the update panel. Use the browser's developer tools to view the HTTP request where you will see the request is an XMLHttpRequest.

    POST /admin/default.aspx HTTP/1.1
    Host: localhost:51867
    Connection: keep-alive
    Content-Length: 413
    Origin: http://localhost:51867
    Cache-Control: no-cache
    User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    X-Requested-With: XMLHttpRequest
    X-MicrosoftAjax: Delta=true
    Accept: */*
    Referer: http://localhost:51867/admin/default.aspx
    Accept-Encoding: gzip, deflate, br
    Accept-Language: en-US,en;q=0.8

    Also, you can easily see that only a portion of the DOM is updated.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 13, 2017 1:44 PM