tags:

views:

706

answers:

3

Can someone explain how UpdatePanel works ? What is uploaded when UpdatePanel make a postback ?

I know how to update partial content, but how about uploading only a part of the page ?

It's not about UploadFile control, it's about postback upload.
Are all controls from the page send through postback on UploadPanel postback ?

A: 

If the postback originates from within your UpdatePanel and your UpdatePanel is set to allow PartialRendering, the content within the UpdatePanel is what is sent/received UNLESS you specify a postback control in the PostBackTrigger collection. In this case a full postback is triggered and your enter page will postback.

I hope this clears things up a bit, JP

EDIT: For clarity and conciseness.

Jonathan
+1  A: 

When an update panel is refreshed on the client, the POST request sends back the same data that would occur for a normal postback. On the server the request will run through it's normal lifecycle with the difference that render will only be called on controls that are children of update panels that are being updated during this request. This partial html is sent back to the client where the AJAX library will insert the new html into the client side elements that represent the update panel.

Daniel
I was afraid by an answer like this.<br/>It seems that I was right, entire page is postback, the server see this like a normal postback.
pixel3cs
+1  A: 

A full postback is always initiated and the entire page is run.

You can however detect that is it a partial postback by use of

ScriptManager.GetCurrent(this.Page).IsInAsyncPostBack

And detect which Updatepanel is updating through

Request["__EVENTTARGET"] == upFlightFare.ClientID

This should make it easier for you to handle the full postbacks on the server side of things.

Grubsnik

related questions