+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Persist widget's default values

Persist widget's default values

3 posts, 0 answered
  1. Kurren
    Kurren avatar
    23 posts
    Registered:
    08 Jun 2013
    17 Mar 2014
    Link to this post

    Hi

    Say I have some default string properties in my widget controller. I want to dynamically populate and save those widget properties as soon as it is dragged onto the page. E.g:

     public string MyString {get;set;};

    If this is my property, how do I populate and persist the time that it was dragged onto the page (as a string)? Is using the web service necessary? 

    Thanks,

    Kurren

  2. Kurren
    Kurren avatar
    23 posts
    Registered:
    08 Jun 2013
    18 Mar 2014
    Link to this post

    Anyone have any idea on how to save a widget's properties? I think I have the first few lines of code:       

    public ActionResult Index()
            {
                if (MyString == null) {
                    var svc = new Telerik.Sitefinity.Modules.Pages.Web.Services.ControlPropertyService();
                    svc.SaveProperties(...);
                } 

    Any help will be great

    Kurren

  3. Kurren
    Kurren avatar
    23 posts
    Registered:
    08 Jun 2013
    20 Mar 2014
    Link to this post

    For anyone else reading this, I contacted support and was told that there is currently no way to give a widget default values and save them.

     Kurren

3 posts, 0 answered