tags:

views:

125

answers:

3

Is it possible to do asynchronous post-back without any page rendering (even no partial rendering as it done with AJAX update-panel)?

I need it to be completely transparent to the user.

Update:
The page contains nested repeaters, with buttons inside repeater's itemtemplate.

When buttons are clicked there is a partial-rendering. I don't want this.

A: 

You could do the regular AJAX-dance, and just direct it to a separate handler for doing what you want, without any rendering. Could that work for your scenario? If not, can you elaborate on what you want to acheive?

Digitalex
what do you mean AJAX-Dance?
dani
you put your data in, you get your content out, in out, in out, shake it all about, you do an insert of content into the DOM, that's what it's all about :)
Russ Cam
Russ: right on :)
Digitalex
+1  A: 

I'm not quite sure what you mean. If the presentation layer does not contain any content that will be affected by the purpose of the AJAX request, then you won't have any page rendering, full or partial.

You can assess the AJAX response using Firebug or Fiddler2 to name a couple of tools.

EDIT

In response to your comment,

Set ChildrenAsTriggers = false on the <asp:UpdatePanel ...> if you don't want the content to be re-rendered in response to a child control initiating a partial postback. It is set to true by default.

You can set ChildrenAsTriggers = false and then explicitly set an <asp:AsyncPostBackTrigger> in the <Triggers> section of the UpdatePanel for those children and their event(s) that you do want the content of the UpdatePanel to be re-rendered for.

Russ Cam
The page have nested repeaters with buttons. when the button is clicked the repeaters get re-rendered. (cause they are inside updatepanel) I don't want this.
dani
Set `ChildrenAsTriggers = false` on the UpdatePanel and then the Repeaters will not be re-rendered
Russ Cam
Yes, this is good. Is it possible to limit this to some controls? Because there is a button ("Update") that I want to render the repeater. - I want to dance on both weddings.
dani
Yes it is. you can Set `ChildrenAsTriggers = false` and then explicitly set an `<asp:AsyncPostBackTrigger >` in the `<Triggers>` section of the `UpdatePanel` for those children and their event(s) that you do want the content of the `UpdatePanel` to be re-rendered for.
Russ Cam
A: 

Yes. I am assuming you are talking about ASP.Net, as you mentioned an update panel.

ASP.Net AJAX will automatically expose web methods on a page and allow you to call those completely on the client. Try this page for more info on exposing web services to client side AJAX.

Khanzor
yes, ASP.NET i tagged this question with appropriate tags.
dani