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

Widget Property Issues in sitefinity 5

1 Answer 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Leo
Top achievements
Rank 1
Leo asked on 24 Jan 2013, 09:11 AM
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?

1 Answer, 1 is accepted

Sort by
0
Courtney Wilson
Telerik team
answered on 24 Jan 2013, 08:52 PM
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
Tags
General Discussions
Asked by
Leo
Top achievements
Rank 1
Answers by
Courtney Wilson
Telerik team
Share this question
or