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. Passing value to Web User Control

Passing value to Web User Control

Scheduled Pinned Locked Moved ASP.NET
helpjavascripthtml
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.
  • P Offline
    P Offline
    Ph ntom
    wrote on last edited by
    #1

    I have created a Web Form (parent), after that I embed a Web User Control using <%@ Register %> directive. Then I have created another Web Form and invoking this as a child. Now I am trying to pass a value back to parent. Problem is if I pass this to some control outside the Web User Control using javascript its passing correctly and I am able to see the passed value; but If pass to some control inside Web User Control using same javascript it won't. This problem can easily visualize through this sketch. [PARENT] [FORM] [HTML CONTROL][/HTML CONTROL] [WEB USER CONTROL] [HTML CONTROL][/HTML CONTROL] [/WEB USER CONTROL] [/FORM] [/PARENT] I am sure there must be some way to solve out. Need help. The Phantom.

    I 1 Reply Last reply
    0
    • P Ph ntom

      I have created a Web Form (parent), after that I embed a Web User Control using <%@ Register %> directive. Then I have created another Web Form and invoking this as a child. Now I am trying to pass a value back to parent. Problem is if I pass this to some control outside the Web User Control using javascript its passing correctly and I am able to see the passed value; but If pass to some control inside Web User Control using same javascript it won't. This problem can easily visualize through this sketch. [PARENT] [FORM] [HTML CONTROL][/HTML CONTROL] [WEB USER CONTROL] [HTML CONTROL][/HTML CONTROL] [/WEB USER CONTROL] [/FORM] [/PARENT] I am sure there must be some way to solve out. Need help. The Phantom.

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      Well its prolly because your going inside a container( the Web User Control ) View the source from IE and find out the name of the container. Then find the control from the container in javascript 1 line of code equals many bugs. So don't write any!!

      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