Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 December 30th, 2003, 05:16 PM
Authorized User
 
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASCX files (event driven plug and play modules...)

Hi again...

Erm... i'm going to go about doing my site/application in little modules.... namely ASCX Files.

Now to start with I had one big page defining the structure of the site in tables... any nested tables i've passed into ASCX files and called them in to the higher up page through the @Register. So I do have nested ASCX pages.

Now am I right in thinking that I could write code to interact with these different modules without making any other 'pages', but create ASCX files that plug and play, and have .vb files behind each ASCX file to provide event handling to change the ASCX file loaded into each? etc etc

My site is quite basically laid out int he following order header, upper navigation, content (the sections across... called tripages: introduction, interaction, intervention), hints section (small line with gobal messages/hints etc), then below that lower navigation bar, then footer.

Now will I get problems passing objects variables/events from one ASCX to another if they are nested?

Good or not?

Thanks,
Deian
 
Old December 31st, 2003, 10:30 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I've never found any code that was plug and play! ;)

To get control to control interaction it's best to use events. You can wire together events in the container (ASPX or ASCX). You can't really write code in one control that talks to another control, because the controls are instanciated in the container and one control wouldn't be able to get a reference to the other control(s). The container would have to provide a reference or you would use events. IMHO the best form is to use events. That way you won't have any worries about controls failing to "contact" other controls.

You won't have any problems with events between nested controls.

If you are looking for a "templating" solution you might want to have a glance at this: http://www.geekdork.com/SkeletonCore.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to play selected video from user click event Medulla Oblongata Javascript How-To 0 June 24th, 2008 10:03 PM
CSS & ASCX files not used by IIS 6.0 OldCoder BOOK: Beginning VB.NET Databases 0 March 31st, 2008 04:37 PM
play wave files kanoorani Javascript How-To 1 September 23rd, 2005 06:34 AM
Error importing modules from .bas files(Excel2003) marpashuk Excel VBA 2 August 27th, 2004 10:47 PM
Cannot Load ASCX files mattshea50 ASP.NET 1.x and 2.0 Application Design 1 July 7th, 2004 09:09 AM





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