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. TO GET THE USER CONTROL ID

TO GET THE USER CONTROL ID

Scheduled Pinned Locked Moved ASP.NET
javatoolsquestion
2 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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Hi, I want to know how will i get the id of the user control whose instance i have created in a form like:

    NOW INSIDE a USER CONTROL JAVA SCRIPT I WANT THE ID "UserControl1" .....how will i get it? Thkx

    H 1 Reply Last reply
    0
    • A Anonymous

      Hi, I want to know how will i get the id of the user control whose instance i have created in a form like:

      NOW INSIDE a USER CONTROL JAVA SCRIPT I WANT THE ID "UserControl1" .....how will i get it? Thkx

      H Offline
      H Offline
      Henrik Sternberg
      wrote on last edited by
      #2

      Hi! Test to click "view source" on the web form, when looking at it from your webbrowser. You will then see that there's no ID:s visible to the user. If you write a typical JavaScript (client-side), you usually don't have any easy way to retrieve the ID. What you might want to try, would be to set a string value to the name of the control in the HTML-code, and then use the Javascript to retrieve the value of the string, rather then try to get the ID from the webcontrol. Hope this helps you, :) /_henrik Henrik Sternberg, Cambridge Technolgy Partners, Germany www.ctp.com/ce henrik.sternberg@ctp.nospam.com (take away nospam)

      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