More examples ?

7 posts, 2 answers
  1. Vasssek
    Vasssek avatar
    143 posts
    Member since:
    Aug 2010

    Posted 12 Mar 2013 Link to this post

    Hello,

    could you please provide more examples, how to save or persist control's state ? Some simple examples for ComboBox, Grid and PanelBar ? I use C# in combination with master page...

    Thank you.

    Best regards

    Vasssek
  2. Answer
    Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 14 Mar 2013 Link to this post

    Hi,

    In scenarios with MasterPage / UserControls the recommended approach is to register RadPersistenceManager in the MasterPage / MainPage and RadPersistenceManagerProxy in the ContentPage / UserControl and register the controls that should be persisted to the corresponding control.

    In the following help article, you can find currently supported RadControls and the Properties that will be persisted.
    http://www.telerik.com/help/aspnet-ajax/persistence-framework-supported-controls.html

    For your convenience I have attached a sample WebSite utilizing both scenarios, please review it and let me know if you need additional information.

    Regards,
    Dobromir
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vasssek
    Vasssek avatar
    143 posts
    Member since:
    Aug 2010

    Posted 01 Apr 2013 Link to this post

    Hello,

    I would like to thank you for your explanation and an example as well. Now, I'm able to save telerik control's state :)).
     
    This Persistence Framework is pefrect !!!

    But I have one small issue, yet. When I call persistenceMngr.LoadState() and it has not been saved before, the error appeared: Unable to read storage content. Could not find file 'C:\inetpub\ASP_Kysuce\Vyroba_test\App_Data\myKey'. Of course, I can make it safety with try catch block, but I want to know, how can I detect whether there was saved something to persistance framework or not without usage of try catch.

    Thank you for your advice.

    Best regards

    Vasssek
     
  5. Answer
    Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 03 Apr 2013 Link to this post

    Hi Vasssek,

    Using Try-Catch is the recommended approach check if there is a previously saved state that can be loaded. The Persistence Framework does not provide any built-in tools to check if there are available states.

    Nevertheless, if you are using the AppDataStorageProvider (the default one) you can check if there is a file with the same name as the value of StorageProviderKey property located in the App_Data folder, but again using Try-Catch is the correct way to handle this case.

    All the best,
    Dobromir
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Vasssek
    Vasssek avatar
    143 posts
    Member since:
    Aug 2010

    Posted 03 Apr 2013 Link to this post

    Hello,

    thank you for your explanation.

    I will use try catch block.

    Have a nice day.

    Vasssek
  7. John
    John avatar
    43 posts
    Member since:
    Aug 2014

    Posted 23 Jul 2015 in reply to Dobromir Link to this post

    Looking at the example code, I don't see where you uniquely identify the Session State on a per User basis.  Please advise. 
  8. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 28 Jul 2015 Link to this post

    Hi John,

    It is up to the developer to find a suitable logic for changing the StorageProviderKey per user, so it could be unique for each user.

    Hope this helps.


    Regards,
    Konstantin Dikov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017