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 from user control to webform

passing value from user control to webform

Scheduled Pinned Locked Moved ASP.NET
questiondatabasehelptutorial
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.
  • J Offline
    J Offline
    jetset32
    wrote on last edited by
    #1

    hi, I recently asked the question, of how to pass a value FROM webform TO usercontrol, I figured this out with help from mike ellison(Cheers!), but now i need to pass a value FROM usercontrol TO webform?? I've tried reversing the technique i used before but that doesnt work. I have a usercontrol which allows people to enter their address details, but becuase i have different usercontrols that are called from a dropdownlist, I have a button on the webform, the button should READ the details entered into the user control and then pass to database. Button code is fine apart from I am unable to Pass the details entered into the usercontrol to the webform....any ideas people! Thanks in advance. jetset

    T 1 Reply Last reply
    0
    • J jetset32

      hi, I recently asked the question, of how to pass a value FROM webform TO usercontrol, I figured this out with help from mike ellison(Cheers!), but now i need to pass a value FROM usercontrol TO webform?? I've tried reversing the technique i used before but that doesnt work. I have a usercontrol which allows people to enter their address details, but becuase i have different usercontrols that are called from a dropdownlist, I have a button on the webform, the button should READ the details entered into the user control and then pass to database. Button code is fine apart from I am unable to Pass the details entered into the usercontrol to the webform....any ideas people! Thanks in advance. jetset

      T Offline
      T Offline
      totig
      wrote on last edited by
      #2

      One way to do this is to provide public properties to your user control. In my controls, I would supply a property for setting or getting the address. This way, your form that hosts the control can set or get that information. If you need any help on this, let me know and I will provide some code showing how this can be done.

      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