Posted By

timgeyssens on 12/17/10


Tagged

umbraco


Versions (?)

Umbraco Juno, usercontrol wrapper also support data editor settings = custom settings on on your usercontrol datatype


 / Published in: C#
 

URL: http://umbraco.org

  1. public partial class Demo : System.Web.UI.UserControl, umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor
  2. {
  3. [DataEditorSetting("testing", description="using DataEditorSettings on usercontrol")]
  4. public string Testing { get; set; }
  5.  
  6. public string umbracoValue;
  7.  
  8. protected void Page_Load(object sender, EventArgs e)
  9. {
  10. if (Page.IsPostBack)
  11. {
  12.  
  13. }
  14. else
  15. {
  16. Literal1.Text = Testing;
  17. }
  18. }
  19.  
  20. public object value
  21. {
  22. get
  23. {
  24. return umbracoValue;
  25. }
  26. set
  27. {
  28. umbracoValue = value.ToString();
  29. }
  30. }
  31. }

Report this snippet  

You need to login to post a comment.