Widget Property Issues in sitefinity 5

2 posts, 0 answers
  1. Leo
    Leo avatar
    8 posts
    Member since:
    Jun 2010

    Posted 24 Jan 2013 Link to this post

    sorry i don't know where to post my sitefinity questions? is there a sitefinity forum?

    i'm developing an web application with sitefinity 5, using MVC mode. my question is, is it possible that setting default values of my widget's public properties?

    I used [DefaultValue("...")], but sf throws an exception when editing this property;
    I commented out the above line, and sf doesn't throw exceptions;
    I set default value to that property via constructor or another field, but neither work.

    i just want the below code work:
    [ControllerToolboxItem(Name = "coc", SectionName = "test", Title = "coc")]
        public class MyCocController : Controller
        {
            [Category("URLs")]
            [DefaultValue("/coc/details")]
            public string UrlDetails { get; set; }
     
            public ActionResult Index()
            {
                return View();
            }
        }

    Any ideas?
  2. Courtney Wilson
    Admin
    Courtney Wilson avatar
    1 posts

    Posted 24 Jan 2013 Link to this post

    Hi,

    Try looking at the developer network forums link:

    http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/using-mvc

    SelAromDotNet give some good suggestions on getting started with Sitefinity and MVC as well as a link to a Sitefinity MVC store with source.

    All the best,
    Courtney Wilson
    the Telerik team
Back to Top