Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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 February 24th, 2006, 06:11 AM
Registered User
 
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with loading user control multiple times

hi,

I was having a problem with displaying of a user control more than once on a webform.The following is the code that I have written in
Page_Load event

 Control[] rc = new Control[2];
 for(i = 0; i < 2; i++)
 {
      rc[i]=(rulecontrol)Page.LoadControl("rulecontrol.ascx") ;
      PlaceHolder1.Controls.Add(rc[i]);
 }

 Instead of displaying the user control 2 times it is displayed only
 once.Can someone help me out with this?

 Regards,
 neha





Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple instances of paging user control thas123 ASP.NET 2.0 Professional 0 February 28th, 2008 02:24 AM
loading user control with callback scripts in a cu brijrajsingh ASP.NET 2.0 Professional 0 March 10th, 2007 04:14 AM
same records shown multiple times alie VB Databases Basics 1 March 8th, 2006 10:13 AM
print multiple times..multiple rows... abhit_kumar JSP Basics 3 January 18th, 2005 07:11 PM
Loading user control dynamically from code-behind jacob ASP.NET 1.0 and 1.1 Basics 2 April 12th, 2004 06:06 PM





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