This is a migrated thread and some comments may be shown as answers.

How to get just one postback?

4 Answers 79 Views
Window
This is a migrated thread and some comments may be shown as answers.
Quim
Top achievements
Rank 1
Quim asked on 17 Sep 2008, 12:04 PM

I'm using a modal RadWindow where I load an aspx page.
I saw same posts with similar problems but I didn't find a reasonable solution.

If I put "ReloadOnShow" to False, I only detect one postback on my aspx page (loaded on RadWindow). However, next time I try to open the window, no postback will be fired.
If I put "DestroyonClose" to True, first time works ok, but after I loose all my Radwindow configuration.
If I put "ReloadOnShow" to True, every time I open RadWindow I detect 3 Postbacks.

Is there any way to use RadWindow  with a single postback?

Regards

4 Answers, 1 is accepted

Sort by
0
Quim
Top achievements
Rank 1
answered on 18 Sep 2008, 07:46 PM

Hi

I found a workaround to get always a postback from the aspx page I want to load. I'm calling a page that makes a url redirect to another page. This way my page is always loaded and I detect a single postback.

The only thing I can't solve is that on second time I open the Window, I see the change from the last web page to the one I use to redirect and again to my aspx page, however my postback only fires once. This flickering is fast but is there. I try to change the web page using the close event after I close the Window, but the page don't change.

Regards.

0
Svetlina Anati
Telerik team
answered on 19 Sep 2008, 02:52 PM
Hi Quim,

I suggest to use a RadWindowManager and set all the desired configuration to this control along with the DestroyOnClose = true. After that you can open RadWindow through radopen(null, url). Please, note, that you should not define the windows in the markup, just set null as first parameter of the radopen method. This should fix the problem.

Sincerely yours,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Quim
Top achievements
Rank 1
answered on 09 Oct 2008, 07:15 PM
Didn't work.

However I notice that if I repeat the url link, postback only fires on first time. Using allways a different url it works all the time. The workaround I used was to pass to the url page an argument with date and time. This way, even to the same page and same arguments (except data and time), url is allways different.

Thanks
0
Svetlina Anati
Telerik team
answered on 10 Oct 2008, 02:12 PM

Hello Quim,

What I assume might happen on your side is that your browser is configured to use caching automatically and that is the reason for not seeing a refreshed page. Please do the following setting in IE:

Tools->Internet options->Browsing History->Settings->Check for newer version of stored pages->Every time I visit the web page

and test again. This should fix the problem. Please, note that this is related to browser specifics and configuration and not to RadWindow's functionality.

For your convenience I attached a sample demo project and a video capture - the RadWindow there is opened as in your sample code, the page gets refreshed every time and it is loaded just once.

Let me know how it goes and in case my assumptions are not correct or you need further assistance.

Sincerely yours,

Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Quim
Top achievements
Rank 1
Answers by
Quim
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or