Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2004, 09:00 AM
Me Me is offline
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing components in a web page

Hi.
I have a custom control and a component in a web page.
From the control I want to have access to the components list that exist on the web page.
How can I do that?
From my custom control I can have access to the page that hosts the control.

Please note that I want to do all this stuff at runtime.
Thanks.

 
Old August 12th, 2004, 01:04 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What you desire is really a misuse of a control. You should not build a control such that is expects its parent to have some property or control. Instead, build the control in a way that it can accept in formation it requires. Then in your page, you should tell that control about the necessary data. Not only is this the more correct way of doing control development, but it's actually a bit easier and less likely to cause problems.
 
Old August 13th, 2004, 04:51 AM
Me Me is offline
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, planoie.
I understand what you say.
I make a control that has a property "RelatedComponent". This property type is "MyComponent" (MyComponent is a component). I set this property at design time.
I want this setted value to be available at runtime too.
Please give me an example how can I do that.

Thank you very much.

 
Old August 15th, 2004, 06:19 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you created a property "RelatedComponent", then you can call the property in the runtime code:

myControl.RelatedComponent = ...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help in searching web components waikiat86 ASP.NET 2.0 Basics 3 July 4th, 2007 02:41 PM
Office Web Components kalebson Access 1 July 16th, 2006 02:13 PM
ASP with web components kathryne Classic ASP Basics 0 September 29th, 2003 08:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.