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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to find all Web Control ID in Asp.net.

How to find all Web Control ID in Asp.net.

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorial
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.
  • R Offline
    R Offline
    Rajesh_K_Sharma
    wrote on last edited by
    #1

    Hi, I made a test.ASPX and usercotrol.ascx. On usercotrol.ascx , I placed three web control like btnsave, btndelete and btnedit. Now I would like to print all web control Id like Btnsave, btndelete, btnedit on a test.ASPX. Any help is appreciated. Regards, Rajesh

    rajesh

    L N 2 Replies Last reply
    0
    • R Rajesh_K_Sharma

      Hi, I made a test.ASPX and usercotrol.ascx. On usercotrol.ascx , I placed three web control like btnsave, btndelete and btnedit. Now I would like to print all web control Id like Btnsave, btndelete, btnedit on a test.ASPX. Any help is appreciated. Regards, Rajesh

      rajesh

      L Offline
      L Offline
      linpihong
      wrote on last edited by
      #2

      maybe you can see the html source code and find out the control's ID

      1 Reply Last reply
      0
      • R Rajesh_K_Sharma

        Hi, I made a test.ASPX and usercotrol.ascx. On usercotrol.ascx , I placed three web control like btnsave, btndelete and btnedit. Now I would like to print all web control Id like Btnsave, btndelete, btnedit on a test.ASPX. Any help is appreciated. Regards, Rajesh

        rajesh

        N Offline
        N Offline
        Nishant Rai
        wrote on last edited by
        #3

        foreach (Control ctrl in YourControlName.Controls) { Response.Write(ctrl.ID+ "||"); }

        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