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


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  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. }

URL: http://umbraco.org

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.