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. General Programming
  3. C#
  4. how to set value to property of user control from webforms code behind?

how to set value to property of user control from webforms code behind?

Scheduled Pinned Locked Moved C#
questioncsharpwinformstutorial
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.
  • S Offline
    S Offline
    sundar156
    wrote on last edited by
    #1

    i have created a usercontrol in .Net and im adding that control from code behind of the webform,i have created some properties in the user controls .How do i access those property from the code behind of my web form?

    people laugh at me because they say im different and I laugh at them because they are all the same.

    M 1 Reply Last reply
    0
    • S sundar156

      i have created a usercontrol in .Net and im adding that control from code behind of the webform,i have created some properties in the user controls .How do i access those property from the code behind of my web form?

      people laugh at me because they say im different and I laugh at them because they are all the same.

      M Offline
      M Offline
      mnvkng76
      wrote on last edited by
      #2

      You would have to declare those properties as Public within the userControl first. Then when you've added the control you can access the properties from the new object once its added.

      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