Wrox Programmer Forums
|
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 November 7th, 2003, 06:15 AM
Authorized User
 
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating control

How can i dynamicly create control in runtime and put it on page in specific place
Thanks Alex
 
Old November 7th, 2003, 09:55 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

1. You need to construct the location where you'll put the control: usually something like a placeholder or a table cell. The control must be accessible from the code.

2. In your code, do this:
    Dim objDynamicallyCreatedControl As New SomeControlType
    myContainerControl.Controls.Add(objDynamicallyCrea tedControl)

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old November 13th, 2003, 08:34 AM
Authorized User
 
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a new control Bhattachan ASP.NET 2.0 Basics 0 August 12th, 2007 11:07 AM
dynamically creating control rahulpokharna Pro VB Databases 1 January 10th, 2006 04:41 PM
creating com control ojemuyiwa Classic ASP Components 0 August 31st, 2005 05:17 AM
Errro creating control usamaalam Crystal Reports 1 May 19th, 2005 02:17 PM
Re-Creating User Control chiefouko General .NET 2 April 12th, 2004 02:26 AM





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