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. getting information about webcontrlos in a webpage

getting information about webcontrlos in a webpage

Scheduled Pinned Locked Moved ASP.NET
helpquestion
3 Posts 3 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.
  • S Offline
    S Offline
    Sonu T
    wrote on last edited by
    #1

    i need to write a code which would retrieve the information about the webcontrols in a webpage. i need to know the count and also what type of controls. i know that System.Reflection namespace can be used. but i do not know what class to use. can anybody help??:^)

    Sonu

    C N 2 Replies Last reply
    0
    • S Sonu T

      i need to write a code which would retrieve the information about the webcontrols in a webpage. i need to know the count and also what type of controls. i know that System.Reflection namespace can be used. but i do not know what class to use. can anybody help??:^)

      Sonu

      C Offline
      C Offline
      coolestCoder
      wrote on last edited by
      #2

      Hi Sonu,

      Sonu.T wrote:

      i need to know the count and also what type of controls

      You can use the Controls collection of the WebForm to know the count of controls and also you can get the 'Type' objects from this collection. What for you need System.Reflection ?


      "A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder


      Anant Y. Kulkarni

      1 Reply Last reply
      0
      • S Sonu T

        i need to write a code which would retrieve the information about the webcontrols in a webpage. i need to know the count and also what type of controls. i know that System.Reflection namespace can be used. but i do not know what class to use. can anybody help??:^)

        Sonu

        N Offline
        N Offline
        Neeraj Arora
        wrote on last edited by
        #3

        I think Page.Controls collection will solve your problems. You can have all information about collection of web controls placed in a web page along with count. Neeraj

        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