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. Accessing WebUserControls and Webform properties

Accessing WebUserControls and Webform properties

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

    Hi all, I'm not sure if I'm heading in the right direction on this, if I'm making things over-complicated then please point it out and point me in the right direction! I'm writing a search filter for my website where people can refine their search results by adding/removing filters like on many other websites. Ebuyer.com springs to mind as a rough example of what I'm trying to achieve. I'm currently creating the filter list as a webusercontrol so that it can be added to more than one webform if required. I want it to interact with it's parent page by changing it's properties and running a couple of public methods (all on the parent page). How do I go about accessing the parent page properties etc? I have tried creating a reference to the page class in the webusercontrol, but it refuses to recognise it. I'm writing it in c#, does anyone have an example they could show me of how I should be doing it, I would greatly appreciate it, or at least a reference to a good comprehensive article, as so far what I have found has led me down dead ends. Any help would be appreciated. Thanks Mark

    C 1 Reply Last reply
    0
    • M markymark82

      Hi all, I'm not sure if I'm heading in the right direction on this, if I'm making things over-complicated then please point it out and point me in the right direction! I'm writing a search filter for my website where people can refine their search results by adding/removing filters like on many other websites. Ebuyer.com springs to mind as a rough example of what I'm trying to achieve. I'm currently creating the filter list as a webusercontrol so that it can be added to more than one webform if required. I want it to interact with it's parent page by changing it's properties and running a couple of public methods (all on the parent page). How do I go about accessing the parent page properties etc? I have tried creating a reference to the page class in the webusercontrol, but it refuses to recognise it. I'm writing it in c#, does anyone have an example they could show me of how I should be doing it, I would greatly appreciate it, or at least a reference to a good comprehensive article, as so far what I have found has led me down dead ends. Any help would be appreciated. Thanks Mark

      C Offline
      C Offline
      Chetan Patel
      wrote on last edited by
      #2

      Sorry friend, Your post is too long and still i am not clear, According to me you want to make communication between User Control and Container Page, Right? Then you need to user Properties to Access Control from Page. And Events (You can pass any value as Event Argument, it can be a class) define in UserControl to communicate with the page. Hope this might be useful to you.

      Best Regards, Chetan Patel

      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