Hello
I add programmaticaly Tab on my TabStrip,
but if the user Refresh the WebPage, i loose My TabStrip and Multipage.
It's possible to Save Tab and Multipage when the user press F5 ?
this sample can help or not ? : http://demos.telerik.com/aspnet-ajax/tabstrip/examples/application-scenarios/persisting-tabstrip-settings/defaultcs.aspx
Cause the restore not work , for Multipage.
thanks for your help
Olivier,
I add programmaticaly Tab on my TabStrip,
but if the user Refresh the WebPage, i loose My TabStrip and Multipage.
It's possible to Save Tab and Multipage when the user press F5 ?
this sample can help or not ? : http://demos.telerik.com/aspnet-ajax/tabstrip/examples/application-scenarios/persisting-tabstrip-settings/defaultcs.aspx
Cause the restore not work , for Multipage.
thanks for your help
Olivier,
4 Answers, 1 is accepted
0
Hi Oliver,
PersistenceFramework doesn't support MulitiPage. Here is a complete list of all controls which can be used with PersistenceFramework.
You should be able to save the selected index of MultipageView manually. Detect F5 pressing on the client with javascript and use a hidden field as a boolean flag to determine later in the server's Page_Load event if the page was refreshed.
or you just can disable page refreshing with F5 as shown here.
Regards,
Hristo Valyavicharski
Telerik
PersistenceFramework doesn't support MulitiPage. Here is a complete list of all controls which can be used with PersistenceFramework.
You should be able to save the selected index of MultipageView manually. Detect F5 pressing on the client with javascript and use a hidden field as a boolean flag to determine later in the server's Page_Load event if the page was refreshed.
<
asp:HiddenField
ID
=
"isF5Pressed"
runat
=
"server"
/>
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack && (isF5Pressed.Value ==
"True"
))
{
//Store multipage's selected index in a session for example
}
}
or you just can disable page refreshing with F5 as shown here.
Regards,
Hristo Valyavicharski
Telerik
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.
0
Olivier
Top achievements
Rank 2
answered on 17 Mar 2014, 04:50 PM
Hello and thanks for your reply.
i found an other solution , i store all the page and parameters in hidden field,
to restore the RabTab when the user press F5.
Or if i can detect F5 to refresh only a iFrame on tab selected.
What do you think ?
olivier
i found an other solution , i store all the page and parameters in hidden field,
to restore the RabTab when the user press F5.
Or if i can detect F5 to refresh only a iFrame on tab selected.
What do you think ?
olivier
0
Hi Oliver,
This could be working. Try with the following code:
Regards,
Hristo Valyavicharski
Telerik
This could be working. Try with the following code:
<script language=
"javascript"
type=
"text/javascript"
>
function
disableF5(e) {
if
((e.which || e.keyCode) == 116)
{
e.preventDefault();
var
multipage = $find(
'RadMultiPage1'
);
multipage.get_pageViews().getPageView(0).set_contentUrl(
"http://www.telerik.com"
);
}
};
$(document).on(
"keydown"
, disableF5);
</script>
Regards,
Hristo Valyavicharski
Telerik
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.
0
Olivier
Top achievements
Rank 2
answered on 20 Mar 2014, 06:48 PM
thanks i will test this.
Olivier
Olivier