Saturday, March 24, 2012

InverseTrigger?

Does such a thing exist yet? I want to trigger a full postback sometimes.
The usual scenario, is that I have the UpdatePanel around a grid to make sorting etc async.
Then, I want a link on the grid to redirect me to another form.
We use our own form loading mechanism, so it has to invoke a server-side function to replace the currently loaded form, which is of course around the UpdatePanel again (outside / parent).

How would this be possible?

hello.

if you want to have a full postback started by an element placed inside the updatepanel, then the easiest way to achieve that is to add a button, set its display style to none, and then call the click method over that dummy button.


Thanks but that won't cut it.
It cannot be done since the postback will be triggered by a button inside a repeater, and the buttons have their arguments.
It would be a hack to have a button which is hidden as well, and it wouldn't do me any good.
I want to handle the button's event like I usually would, not some other event (hack, duplicate code).

And if I really wanted to do that, I could just made the page implement IPostbackEventHandler and submit the form myself (without invisible button hack).

Please tell if UpdatePanel will have InverseTrigger in future releases. It is crucial if you have a LinkButton inside UpdatePanel that you know will do something with control outside it!

--

I made something named PopupCallback feature for popups calling a server side method on it's opener.
I can probably use that same thing to solve my problem. But UpdatePanel should really have this stuff built in!

Thanks in advance!

EmilChristopherMelar:


It cannot be done since the postback will be triggered by a button inside a repeater, and the buttons have their arguments.

well, not easy then. unfortunately, all the controls placed inside an updatepanel will only be able to produce a partial postback since those calls will allways be intercepted by client side. that's why i suggested the hack (which is really the easiest way to get a full postback from within an updatepanel)


I understand, but wouldn't it be a way to change the UpdatePanel to work this way as well? I think it is a requested feature.

Would it be possible to extend certain controls or tag them somehow with an extender or whatever to trigger a full postback / bypass UpdatePanel? I cannot use UpdatePanel since my page loading mechanics are not URL based, but post based ( I have my reasons ;-) ).
* bump *

No comments:

Post a Comment