473,394 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

UpdatePanel AJAX question

Hi guys,

I know that the page is reconstructed every time whenever an asynch postback
is occuring... I've put a breakpoint in the page render method and the
function still gets called when the postback is an asynch one.

Is the framework optimizing the rendering process on asynch postback?

How does the __doPostBack() is working whenever an asynch call is made? Is
the page gets constructed as if it was not "in AJAX mode" and the parts
updated on the client screen is extracted from the server response (in
JavaScript)?

It's the parts I'm missing

Thanks guys
Sep 3 '08 #1
2 1800
the update panel works pretty simple. when a async postback is done,
javascript calls __dopostback, which builds a string of all form elements and
their values (in the same format as a form post) and posts the values to the
page via xmlhttprequest.

the server process the page as a normal postback, but only collects the html
output (calls render) on the update panel(s) as the request was marked as an
async postback. it then returns the html (and script as piped delimited data)
to the client. the client receives the response, and sets the innerHtml of
the update panel's div to the returned html. it also will process any return
javascript the scriptmanager sent back. javascript support was adedd mostly
for validator support.

some other work that needs to be done, is before replacing the html, the
updatepanel has a list of all client components that must be "disposed".

if the amout of replacement html is small, then its faster then a true
postback, but as the size grows, its becomes more expensive.
-- bruce (sqlwork.com)
"Mike Gleason jr Couturier" wrote:
Hi guys,

I know that the page is reconstructed every time whenever an asynch postback
is occuring... I've put a breakpoint in the page render method and the
function still gets called when the postback is an asynch one.

Is the framework optimizing the rendering process on asynch postback?

How does the __doPostBack() is working whenever an asynch call is made? Is
the page gets constructed as if it was not "in AJAX mode" and the parts
updated on the client screen is extracted from the server response (in
JavaScript)?

It's the parts I'm missing

Thanks guys
Sep 3 '08 #2

"bruce barker" <br*********@discussions.microsoft.coma écrit dans le
message de news: 6A**********************************@microsoft.com...
the update panel works pretty simple. when a async postback is done,
javascript calls __dopostback, which builds a string of all form elements
and
their values (in the same format as a form post) and posts the values to
the
page via xmlhttprequest.

the server process the page as a normal postback, but only collects the
html
output (calls render) on the update panel(s) as the request was marked as
an
async postback. it then returns the html (and script as piped delimited
data)
to the client. the client receives the response, and sets the innerHtml of
the update panel's div to the returned html. it also will process any
return
javascript the scriptmanager sent back. javascript support was adedd
mostly
for validator support.

some other work that needs to be done, is before replacing the html, the
updatepanel has a list of all client components that must be "disposed".

if the amout of replacement html is small, then its faster then a true
postback, but as the size grows, its becomes more expensive.
-- bruce (sqlwork.com)

Thanks a lot, this clears up things a lot...

I also found while debugging that the chain of the Render method is called
except that a System.IO.TextWriter.NullTextWriter is passed to the Render()
method of components that doesn't need to be updated (outside of
UpdatePanels)...

Thanks again

Mike

Sep 3 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: brett | last post by:
I have an AJAX updatepanel in an aspx page. Inside the updatepanel is a placeholder control, which loads various ascx files. This all works fine. One of the ascx files also has an updatepanel in...
0
by: Reinhard | last post by:
Hi, Need some directions on Ajax, UpdatePanel and Gridview to achive the following: I like to show a Gridview with Data ONLY if the user is interested in Details, but without a full page...
2
by: John Grandy | last post by:
Is anyone finding that cookies added to the Response.Cookies collection within pages which contain an UpdatePanel do not exist in the Request.Cookies collection when the page is posted back ? ...
2
by: artemis1101 | last post by:
Good day, I have a C# asp.net ajax-enabled website that uses an update panel to dynamically update some controls on my page - one of the controls that it updates is a date/time drop down list,...
1
by: abellix | last post by:
An updatepanel contains a datagrid, this datagrid has columns generated by code-behind: some columns should have async postback, others should have sync postback. Here a sample to reproduce the...
1
by: =?Utf-8?B?T2xlZw==?= | last post by:
Hi, I'm wondering if anybody using ajax extensions where UpdatePanel tag is used in addition to existing ajax implementation where UpdatePanel wasn't used yet. So, there is already a web project...
6
by: GaryDean | last post by:
Is there any way to make an asp FileUpload control work within an UpdatePanel? Thanks, Garyh
4
by: pechar | last post by:
Hi All, This question has been asked many times and I've checked most of the sites with resolutions. None worked for me. 1) I have a page which is a content page to a Masterpage . 2) I have a...
13
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
5
by: Pselus | last post by:
I have a dynamically created page. The page creates an UpdatePanel (created at Design time) which has an ASP:Table (design time) in it. The table has rows with a textbox (run time) that runs some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.