Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 1st, 2006, 05:40 AM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Composite Control Part 2

Hi all.

Having created my composite control, I would like to simplify the usage of the component. The component needs to be binded to a control on the Web Form (very much like a RangeValidator control).

Currently, the properties of my component requires you to type the name of the correct component. However, this allows room for error, and it also allows someone to break the code by entering a name of an incompatible binding component.

My Composite Control can only be binded with a GridView Control, Datalist Control, and a Repeater Control. Therefore, the ideal solution would be a drop down in the properties of my component which is populated with the names of the valid components which are on the same page.

While this is done in some of the built in ASP.NET 2 Components, I cannot find any resources to help me achieve this.

Any help or suggestions would be appreciated.

With thanks,
Orig Jones.
Reply With Quote
  #2 (permalink)  
Old September 15th, 2006, 08:28 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

This may be a bit late, but you can take a look here:

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=305

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: The Only Mistake by Joy Division (Track 18 from the album: Heart And Soul (CD 1)) What's This?
Reply With Quote
  #3 (permalink)  
Old September 18th, 2006, 03:28 AM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thankyou Imar, this was a really helpfull link.

If anyone is curious, I re-used the same code, except that I changed the main if-statement to check if each component was of type Repeater, or DataGrid since my control was only applicable to one of these controls:

        protected override Boolean IncludeControl(Control serverControl)
        {
            if ((serverControl is Repeater) || (serverControl is DataGrid))
            {
                return true;
            }
            else
            {
                return false;
            }
        }

With thanks,

Orig.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Templates in a Composite Control dparsons ASP.NET 2.0 Professional 0 April 24th, 2008 12:28 PM
Chp.5 composite control properties studen77 BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 1 October 6th, 2006 03:35 PM
Building composite Control with Image + DDL mehdi_tn ASP.NET 2.0 Professional 1 April 12th, 2006 10:48 PM
PLEASE HELP - Composite Control brettk_1 ASP.NET 1.0 and 1.1 Professional 0 August 3rd, 2005 06:22 AM
Composite Control bmains .NET Framework 2.0 0 July 25th, 2005 12:57 PM



All times are GMT -4. The time now is 11:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.