Hi,
I have some placeholders in my .aspx file, and when I add my controls to
them at runtime I want them to appear in specific positions on the web form,
however there are already some controls that appear statically, but the run
time created controls overwrite them, so is there a way to force the dynamic
controls to appear below them, or anywhere I choose really?
Also my PlaceHolders have ids of "actname1", "actname2", "actname3" etc, so
is there a way that in my code I can use the same code to effectively do
this for each
Label aLabel = new Label();
aLabel.Text = dataRow["activity_name"].ToString()
actname1.Controls.Add(aLabel)
All I want to do is add the appropriate number to the tail end of the
placeholder id, so something like
actname + <rownumber>.Controls.Add(aLabel)
I guess I could iterate thro the Page controls find all the placeholders and
store their references in a list using the row number as an index to the
appropriate placeholder reference???
Any thoughts out there on Xmas Eve, well it is here in NZ! :-)
TIA
Colin B 5 1272
Hello again,
As I wanted my controls to appear in specific positions on the web form, I
wrapped each one with a <div></div> pair, I set the style on each <div> to
position the contents specifically which on viewing the design page it has
placed the placeholders underneath each other, as I want, but when I run it,
and add my new label+text to each one's Controls array the controls are
simply next to each other in a line, not underneath each other as at design
time... :-(
Any thoughts?
TIA
Colin
"Colin Basterfield" <co**************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Hi,
I have some placeholders in my .aspx file, and when I add my controls to them at runtime I want them to appear in specific positions on the web
form, however there are already some controls that appear statically, but the
run time created controls overwrite them, so is there a way to force the
dynamic controls to appear below them, or anywhere I choose really?
Also my PlaceHolders have ids of "actname1", "actname2", "actname3" etc,
so is there a way that in my code I can use the same code to effectively do this for each
Label aLabel = new Label(); aLabel.Text = dataRow["activity_name"].ToString() actname1.Controls.Add(aLabel)
All I want to do is add the appropriate number to the tail end of the placeholder id, so something like
actname + <rownumber>.Controls.Add(aLabel)
I guess I could iterate thro the Page controls find all the placeholders
and store their references in a list using the row number as an index to the appropriate placeholder reference???
Any thoughts out there on Xmas Eve, well it is here in NZ! :-)
TIA Colin B
Maybe you need to add one more control... a literal containing "<br>" ?
"Colin Basterfield" <co**************@hotmail.com> wrote in message
news:e0**************@TK2MSFTNGP11.phx.gbl... Hello again,
As I wanted my controls to appear in specific positions on the web form, I wrapped each one with a <div></div> pair, I set the style on each <div> to position the contents specifically which on viewing the design page it has placed the placeholders underneath each other, as I want, but when I run it, and add my new label+text to each one's Controls array the controls are simply next to each other in a line, not underneath each other as at design time... :-(
Any thoughts? TIA Colin
"Colin Basterfield" <co**************@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Hi,
I have some placeholders in my .aspx file, and when I add my controls to them at runtime I want them to appear in specific positions on the web form, however there are already some controls that appear statically, but the run time created controls overwrite them, so is there a way to force the dynamic controls to appear below them, or anywhere I choose really?
Also my PlaceHolders have ids of "actname1", "actname2", "actname3" etc, so is there a way that in my code I can use the same code to effectively do this for each
Label aLabel = new Label(); aLabel.Text = dataRow["activity_name"].ToString() actname1.Controls.Add(aLabel)
All I want to do is add the appropriate number to the tail end of the placeholder id, so something like
actname + <rownumber>.Controls.Add(aLabel)
I guess I could iterate thro the Page controls find all the placeholders and store their references in a list using the row number as an index to the appropriate placeholder reference???
Any thoughts out there on Xmas Eve, well it is here in NZ! :-)
TIA Colin B
Ken,
Thanks for that but it doesn't make any difference, they still appear one
after the other in a line, so not sure how to proceed now.
I am having a real baptism by fire with HTML, and to a lesser extent
ASP.NET, which keeps me amused... :-)
Any more thoughts?
Thanks again
Colin
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Maybe you need to add one more control... a literal containing "<br>" ?
"Colin Basterfield" <co**************@hotmail.com> wrote in message news:e0**************@TK2MSFTNGP11.phx.gbl... Hello again,
As I wanted my controls to appear in specific positions on the web form,
I wrapped each one with a <div></div> pair, I set the style on each <div>
to position the contents specifically which on viewing the design page it
has placed the placeholders underneath each other, as I want, but when I run it, and add my new label+text to each one's Controls array the controls are simply next to each other in a line, not underneath each other as at design time... :-(
Any thoughts? TIA Colin
"Colin Basterfield" <co**************@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Hi,
I have some placeholders in my .aspx file, and when I add my controls
to them at runtime I want them to appear in specific positions on the web form, however there are already some controls that appear statically, but the run time created controls overwrite them, so is there a way to force the dynamic controls to appear below them, or anywhere I choose really?
Also my PlaceHolders have ids of "actname1", "actname2", "actname3"
etc, so is there a way that in my code I can use the same code to effectively
do this for each
Label aLabel = new Label(); aLabel.Text = dataRow["activity_name"].ToString() actname1.Controls.Add(aLabel)
All I want to do is add the appropriate number to the tail end of the placeholder id, so something like
actname + <rownumber>.Controls.Add(aLabel)
I guess I could iterate thro the Page controls find all the
placeholders and store their references in a list using the row number as an index to
the appropriate placeholder reference???
Any thoughts out there on Xmas Eve, well it is here in NZ! :-)
TIA Colin B
Hi Colin,
Perhaps you could show us the HTML code output that you are getting? That
way we could work on getting the result right.
Hmmmm... are you using absolute positioning? That might be defeating other
code that attempts to use layout mode.
"Colin Basterfield" <co**************@hotmail.com> wrote in message
news:e7*************@TK2MSFTNGP12.phx.gbl... Ken,
Thanks for that but it doesn't make any difference, they still appear one after the other in a line, so not sure how to proceed now.
I am having a real baptism by fire with HTML, and to a lesser extent ASP.NET, which keeps me amused... :-)
Any more thoughts? Thanks again Colin
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Maybe you need to add one more control... a literal containing "<br>" ?
"Colin Basterfield" <co**************@hotmail.com> wrote in message news:e0**************@TK2MSFTNGP11.phx.gbl... > Hello again, > > As I wanted my controls to appear in specific positions on the web > form, I > wrapped each one with a <div></div> pair, I set the style on each <div> to > position the contents specifically which on viewing the design page it has > placed the placeholders underneath each other, as I want, but when I > run > it, > and add my new label+text to each one's Controls array the controls are > simply next to each other in a line, not underneath each other as at > design > time... :-( > > Any thoughts? > TIA > Colin > > "Colin Basterfield" <co**************@hotmail.com> wrote in message > news:%2****************@TK2MSFTNGP11.phx.gbl... >> Hi, >> >> I have some placeholders in my .aspx file, and when I add my controls to >> them at runtime I want them to appear in specific positions on the web > form, >> however there are already some controls that appear statically, but >> the > run >> time created controls overwrite them, so is there a way to force the > dynamic >> controls to appear below them, or anywhere I choose really? >> >> Also my PlaceHolders have ids of "actname1", "actname2", "actname3" etc, > so >> is there a way that in my code I can use the same code to effectively do >> this for each >> >> Label aLabel = new Label(); >> aLabel.Text = dataRow["activity_name"].ToString() >> actname1.Controls.Add(aLabel) >> >> All I want to do is add the appropriate number to the tail end of the >> placeholder id, so something like >> >> actname + <rownumber>.Controls.Add(aLabel) >> >> I guess I could iterate thro the Page controls find all the placeholders > and >> store their references in a list using the row number as an index to the >> appropriate placeholder reference??? >> >> Any thoughts out there on Xmas Eve, well it is here in NZ! :-) >> >> TIA >> Colin B >> >> > >
Not sure if a dim view is taken of attaching a file, but given that you
asked for HTML, then unles I attach it you won't see it in the message.
If the moderator is reading, please accept my apologies, and perhaps suggest
a way of achieving the requirement
I am using absolute positioning, so I will play around with that whilst I
wait for a reply :-)
Cheers Ken
Colin
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:eI**************@TK2MSFTNGP12.phx.gbl... Hi Colin,
Perhaps you could show us the HTML code output that you are getting? That way we could work on getting the result right.
Hmmmm... are you using absolute positioning? That might be defeating other code that attempts to use layout mode.
"Colin Basterfield" <co**************@hotmail.com> wrote in message news:e7*************@TK2MSFTNGP12.phx.gbl... Ken,
Thanks for that but it doesn't make any difference, they still appear
one after the other in a line, so not sure how to proceed now.
I am having a real baptism by fire with HTML, and to a lesser extent ASP.NET, which keeps me amused... :-)
Any more thoughts? Thanks again Colin
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Maybe you need to add one more control... a literal containing "<br>" ?
"Colin Basterfield" <co**************@hotmail.com> wrote in message news:e0**************@TK2MSFTNGP11.phx.gbl... > Hello again, > > As I wanted my controls to appear in specific positions on the web > form, I > wrapped each one with a <div></div> pair, I set the style on each
<div> to > position the contents specifically which on viewing the design page
it has > placed the placeholders underneath each other, as I want, but when I > run > it, > and add my new label+text to each one's Controls array the controls
are > simply next to each other in a line, not underneath each other as at > design > time... :-( > > Any thoughts? > TIA > Colin > > "Colin Basterfield" <co**************@hotmail.com> wrote in message > news:%2****************@TK2MSFTNGP11.phx.gbl... >> Hi, >> >> I have some placeholders in my .aspx file, and when I add my
controls to >> them at runtime I want them to appear in specific positions on the
web > form, >> however there are already some controls that appear statically, but >> the > run >> time created controls overwrite them, so is there a way to force the > dynamic >> controls to appear below them, or anywhere I choose really? >> >> Also my PlaceHolders have ids of "actname1", "actname2", "actname3" etc, > so >> is there a way that in my code I can use the same code to
effectively do >> this for each >> >> Label aLabel = new Label(); >> aLabel.Text = dataRow["activity_name"].ToString() >> actname1.Controls.Add(aLabel) >> >> All I want to do is add the appropriate number to the tail end of
the >> placeholder id, so something like >> >> actname + <rownumber>.Controls.Add(aLabel) >> >> I guess I could iterate thro the Page controls find all the placeholders > and >> store their references in a list using the row number as an index to the >> appropriate placeholder reference??? >> >> Any thoughts out there on Xmas Eve, well it is here in NZ! :-) >> >> TIA >> Colin B >> >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: DotNetGruven |
last post by:
Hi,
Is there a trick to using nested PlaceHolders?
I have a WebForm that has 3 PlaceHolders on it:
headerPlaceHolder
contentPlaceHolder
footerPlaceHolder
|
by: buran |
last post by:
Dear ASP.NET Programmers,
Please consider the following code. How can I reach the textbox with the ID
txtBurak in the "pe.ascx"?
Private Sub cblMRParts_SelectedIndexChanged(ByVal sender As...
|
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...
|
by: Sinisa Ruzin |
last post by:
Hi all,
I had problem with dynamically adding/removing controls;ascx,
Controls.Add(Page.LoadControl... in the same page of the IBuySpy
portal. ASP.NET, C#.
I added buttons to the main ASCX loaded...
|
by: Alan Silver |
last post by:
Hello,
I am displaying product details on a page and am allowing the site owner
to specify the style in which the product details are displayed. I am
debating which of two approaches to use here...
| |
by: Dan Sugalski |
last post by:
Is there any way to convince explain to go do its thing when given a
query with placeholders in it?
I'm trying to do some performance checking of some of the queries
built into a system I'm...
|
by: Dan Sugalski |
last post by:
Is there any good way to speed up SQL that uses like and has placeholders?
Here's the scoop. I've got a system that uses a lot of pre-generated
SQL with placeholders in it. At runtime these SQL...
|
by: nemesis.saurabh |
last post by:
hi,
i am using VS 2005. i have created a master.master.
i have added 2 content placeholders, i am able to edit them in the
corresponding content page
but if i am adding anymore placeholders in...
|
by: pankajit09 |
last post by:
Hello,
Is it possible to put two placeholders in Ajax Updater ?
or
Can I use the same placeholder(div ID ) at two places in HTML?
var myAjax =...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |