Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Design-time render error for CompositeControl

Design-time render error for CompositeControl

Scheduled Pinned Locked Moved ASP.NET
htmldesignhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fayu
    wrote on last edited by
    #1

    I have a composite control that works fine during runtime. However, during design time I receive an error: " '3' could not be set on property 'TotalItems'". When I first add this composite control on a page, it is rendered correctly. After I close that page and reopen it, I get this error. This is what my propery looks like:

       \[Browsable(true),
        Bindable(true)\]
        public long TotalItems
        {
            get
            {
                if (ViewState\["TotalItems"\] == null) return 10;
    
                return Convert.ToInt64(ViewState\["TotalItems"\]);
            }
            set
            {
                ViewState\["TotalItems"\] = value;
    
            }
        }
    

    Here is what the class looks like:

    \[Designer(typeof(CompositeControlDesigner)),
    ParseChildren(true)\]
    public sealed class CustomGrid: CompositeControl, INamingContainer, IEnumerator
    {
    

    ...
    }

    Here is what the markup looks like:

    Let me know if any more info is required. Thanks in advance.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups