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. ServerControl property defined as Interface isn't available in Intellisense

ServerControl property defined as Interface isn't available in Intellisense

Scheduled Pinned Locked Moved ASP.NET
phpdatabasevisual-studiocomsysadmin
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.
  • M Offline
    M Offline
    Mark J Miller
    wrote on last edited by
    #1

    I am creating a server control library and I have a control which has a property named menu. The menu property can be a any server control which inherits from a class named MenuBaseItem. The property is currently defined like this: [NotifyParentProperty(true)] [PersistenceMode(PersistenceMode.InnerProperty)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public List<MenuBaseItem> items { get { return _items; } } What I'd like to be able to do is use an interface instead: [NotifyParentProperty(true)] [PersistenceMode(PersistenceMode.InnerProperty)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public List<IMenuItem> items { get { return _items; } } The above interface IMenuItem will allow an object to convert itself to a menu item so I can include other types as menu items. My problem is that this will compile, but when I open my aspx template and try to edit the property I no longer get any intellisense list of controls which can be used. Is there another interface which must be implmented as part of IMenuItem that will allow intellisense to work with my solution?

    Code responsibly: OWASP.org Mark's blog: developMENTALmadness.blogspot.com

    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