473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

User Control in a Placeholder

I figured this out several months ago and now that I need
it I've misplaced my code...

How do I use a placeholder control to dynamically insert
a user control (.ascx) into a page?

Thanks!

Ian
Nov 17 '05 #1
3 1181
Hi

PlaceHolder1.Controls.Add(<<userControl>>);

Ravikanth

-----Original Message-----
I figured this out several months ago and now that I needit I've misplaced my code...

How do I use a placeholder control to dynamically insert
a user control (.ascx) into a page?

Thanks!

Ian
.

Nov 17 '05 #2
PlaceHolderName.Controls.Add(LoadControl("UserCont rolPath"))

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.

"R. Ian Lee" <ia*****@jacobs.com> wrote in message
news:0e****************************@phx.gbl...
I figured this out several months ago and now that I need
it I've misplaced my code...

How do I use a placeholder control to dynamically insert
a user control (.ascx) into a page?

Thanks!

Ian

Nov 17 '05 #3
Mucho gracias! That's what I was looking for.

Ian

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:Ox**************@tk2msftngp13.phx.gbl...
PlaceHolderName.Controls.Add(LoadControl("UserCont rolPath"))

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
The more I learn, the less I know.

"R. Ian Lee" <ia*****@jacobs.com> wrote in message
news:0e****************************@phx.gbl...
I figured this out several months ago and now that I need
it I've misplaced my code...

How do I use a placeholder control to dynamically insert
a user control (.ascx) into a page?

Thanks!

Ian


Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: paul meaney | last post by:
All, myself and another developer have been staring blankly at a screen for the past 48 hours and are wondering just what stunningly obvious thing we are missing. We are trying to load up 2...
1
by: Dan | last post by:
I have an asp.net page default.aspx with a user control and a placeholder control. <html> <body> <form id="myform" method="post" runat="server" /> <PageHeader:Header id="header1"...
1
by: Josh | last post by:
Hi Guys, I have been having a big problem with trying to pass parameters into a user control when the user control is dynamically loaded into a placholder. I am developing in c#. I have get...
1
by: Kris van der Mast | last post by:
Hi, been a while since I posted a question myself instead of trying to help others out. I'm refactoring an existing web app that uses dynamic loading of user controls and a lot of...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
4
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
2
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
0
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
3
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.