Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 March 30th, 2004, 05:20 PM
Registered User
 
Join Date: Mar 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Form Instances in a single form?

Hi all,

Here is my situation... I need to code a web page that is going to display multiple groups of items. However, each group will be identical except for the data displayed in the objects. In this case at the very least I will have a few labels and a datagrid as a group. Depending on selection criteria I will have from 0 to 100 of these groups on a single page. I have been trying to figure out how to make this happen. One idea I came up with is since each group will have the same structure and format then why not create a single web form with the structure and items and then instantiate it as many times as I need to on a seperate page. However, I am not sure in the feasibility and if possible how do I import a webform many times from a single webform? Any ideas at all would be helpful at this point.

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

This what UserControls are for. You can create a user control that defines the layout of the item you want to repeat. Then you can have as many instances of that user control in one web form as you want (or as many as the server will handle ;)).

Alternatively, you can use one of the bindable repeating controls to repeat a layout template. The DataList and Repeater will do this very easily. If all you want is to display data in a free-form template, use the repeater control.

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Single form for multi functions anukagni Access 2 July 29th, 2006 12:24 AM
Problem with creating Multiple instances of Form i vb_programmer Pro VB 6 1 June 29th, 2006 10:29 PM
Multiple browser instances Dilip Nagle Classic ASP Basics 1 September 29th, 2005 10:33 PM
multiple instances of same spreadsheet opening Jingels Excel VBA 1 January 31st, 2005 02:03 AM
One form in multiple instances. Sink Access VBA 0 June 7th, 2004 04:25 AM





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