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

Persist RadPane ContentUrl on Refresh

3 Answers 109 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Brad Bamford
Top achievements
Rank 1
Brad Bamford asked on 18 Feb 2011, 05:38 AM
I have a simple page setup with two horizontal panes.

1 Header Pane - with a RadMenu Control
1 Content Pane

When a user clicks on a rad menu link it loads the corresponding page into the ContentPane.
This works great until the user clicks refresh on the browser and the ContentPane loads the inital page instead of the last page the user was on.

Can the ContentUrl be persisted on a page refesh?
If not, should I build some type of cookie system that will hold the users' last contentURL or is there a better way?

Thanks,

Brad

3 Answers, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 22 Feb 2011, 03:34 PM
Hello Brad,

Could you, please, elaborate on the way you are changing the ContentUrl of the content pane? I did some tests using the setup you described and the ContentUrl was persistent on page refresh (through F5 or similar). You can find this implementation in the attached sample project.

All the best,
Nikodim
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Brad Bamford
Top achievements
Rank 1
answered on 08 Mar 2011, 08:29 PM
Thanks for the reply.
However, your example is only sort of maintaing state because you are using asp:linkbuttons.
There's a postback that is occuring, and the refresh is just reissuing the last postback. It isn't really maintaing the ContentURL state of RadPane. If you do a search in bing and then refresh the page it isn't mainting the last bing search you made.

Also, the RadMenu that I am using creates standard anchor tags.

I managed to get this to work using the RadMenu's OnClientItemClicked event to store the URL of the last menu item clicked in a cookie and then reloading it on a page refresh. However, I wish there was an easy way to detect link clicks from within the RadPane. (Bing searches in your example)

It would be nice if there was a clientside event that would fire from the RadPane such as ContentUrl_Changed, or ContentUrl_LoadComplete. This would provide an easy way to persist the actuall RadMenu URLs.

0
Niko
Telerik team
answered on 11 Mar 2011, 06:26 PM
Hello Brad,

Implementing such an event is impossible due to platform restrictions based on security concerns. Basically working with external content from within one's page is a violation of the Same Origin Policy. The external content itself should remain anonymous otherwise anyone can change it.

All the best,
Nikodim
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Splitter
Asked by
Brad Bamford
Top achievements
Rank 1
Answers by
Niko
Telerik team
Brad Bamford
Top achievements
Rank 1
Share this question
or