Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rahul 3 posts 73 karma points
    Feb 04, 2016 @ 06:18
    Rahul
    0

    Create .Net Custom Control

    I want to use Umbraco .NET Custom Control in Macro. I have gone through following steps:

    1) I have created new Macro with name TestProperty Adding Assembly to Macro Use .NET Custom Control

    2) Browse and Add Pramater from Assembly Brose and Save Property in Umbraco

    Adding Parameter 3) Use Macro in Template enter image description here

    enter image description here

    I did not get any problem till last step. But when i am previewing my Content then I am getting Page with Error as Below:

    Error

    enter image description here

    My Class code is as Below:

    using CustomServiceRepository.Interfaces;
    
    namespace CustomServiceRepository.Repositories
    {
        public class EmployeeRepository : IEmployeeRepository
        {
            private int _PvtTotal;
            public int TestProperty { get{return 5;} set{_PvtTotal=value;} }
            public int GetTotalCount()
            {
                return 5;
            }
    
        }
    }
    

    How can I get my Property Value in this case?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 04, 2016 @ 07:59
    Ismail Mayat
    0

    Anything in the umbraco log file? Also try debugging using visual studio it may be you have error in the control?

  • Rahul 3 posts 73 karma points
    Feb 04, 2016 @ 09:48
    Rahul
    0

    No I am not getting any Specific Entry in UmbracoLog for this Exception. And also i tried by debugging in Visual studio, But no clue from it.

Please Sign in or register to post replies

Write your reply to:

Draft