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. Retreive control with certain type (Related to Win form and ASP.net)

Retreive control with certain type (Related to Win form and ASP.net)

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netwinformsquestionlearning
3 Posts 2 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.
  • W Offline
    W Offline
    wilsonmanmcp
    wrote on last edited by
    #1

    Hi everyone, I have some usercontrols which implements my custom interface IMyControl. I want to know if there is a EASY and EFFICIENT way to retreive all my custom controls with type = IMyControl from either ASP.net page or winforms. I know I can recursively loop through each control.controls and compare the typeof ctrl is IMyControl but I think this is not efficients if I have nested level of controls? thanks in advance.. cheers. Wilson

    Still a newbie.. learning

    J 1 Reply Last reply
    0
    • W wilsonmanmcp

      Hi everyone, I have some usercontrols which implements my custom interface IMyControl. I want to know if there is a EASY and EFFICIENT way to retreive all my custom controls with type = IMyControl from either ASP.net page or winforms. I know I can recursively loop through each control.controls and compare the typeof ctrl is IMyControl but I think this is not efficients if I have nested level of controls? thanks in advance.. cheers. Wilson

      Still a newbie.. learning

      J Offline
      J Offline
      Jeneesh K Velayudhan
      wrote on last edited by
      #2

      Y can't you use 'findcontrol()' method. Will it solve your problem ?

      Thanks & Regards, Jeneesh k. v.

      W 1 Reply Last reply
      0
      • J Jeneesh K Velayudhan

        Y can't you use 'findcontrol()' method. Will it solve your problem ?

        Thanks & Regards, Jeneesh k. v.

        W Offline
        W Offline
        wilsonmanmcp
        wrote on last edited by
        #3

        thanks.. but don't think that is what I want to achieve.. what I want to do is retreive all those controls with specify type e.g. IMyControls. then I can call a function declared within that interface for all those controls. . I don't think I can just the FindControl to get certain TYPE of control? Cheers, Wilson

        Still a newbie.. learning

        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