473,326 Members | 2,168 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,326 software developers and data experts.

retain controls added to placeholder during postback?

I'm adding several controls (labels, etc.) to a placeholder programatically.
I'd like the PlaceHolder to maintain these contents during postbacks without
having to programmatically recreate their contents. Is there a way to do
this?

Thanks in advance.

Mark
Nov 18 '05 #1
2 2003
> I'd like the PlaceHolder to maintain these contents during postbacks
without
having to programmatically recreate their contents. Is there a way to do
this?
No. Whom do you expect to re-create their contents? It's either going to be
your application or nobody.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mark" <mf****@idonotlikespam.cce.umn.edu> wrote in message
news:eZ*************@tk2msftngp13.phx.gbl... I'm adding several controls (labels, etc.) to a placeholder programatically. I'd like the PlaceHolder to maintain these contents during postbacks without having to programmatically recreate their contents. Is there a way to do
this?

Thanks in advance.

Mark

Nov 18 '05 #2
The contents must be recreated after postback one way or another.
However, you can automate the process with techniques such as this:
http://www.ftponline.com/vsm/2003_04...efault_pf.aspx
It discusses extending the panel control to help make such tasks easier.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Mark" <mf****@idonotlikespam.cce.umn.edu> wrote in message
news:eZ*************@tk2msftngp13.phx.gbl...
I'm adding several controls (labels, etc.) to a placeholder programatically. I'd like the PlaceHolder to maintain these contents during postbacks without having to programmatically recreate their contents. Is there a way to do
this?

Thanks in advance.

Mark

Nov 18 '05 #3

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

Similar topics

2
by: theo | last post by:
Hi... I wish to extract the text content of an Xml file and assign it to DropDownList controls at runtime.I can get the Xml file text content into the DropDownList controls (Ex...if 5 Xml text...
9
by: wASP | last post by:
Hello again to all of you geniuses, I'm having a problem trying to load dynamic controls at the initialization phase. I've read the docs, and I thought I had it figured out:...
2
by: Sam | last post by:
I have a custom control (MyTextBox - taken from Microsoft website) that implements the IPostBackDataHandler interface. It is added to the controls collection of a placeholder control during the...
1
by: Angel | last post by:
I have added controls to the placeholder control. All the controls that were added have EnableViewState = true including the placeholder. One of the controls has a button that performs a postback. My...
1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
13
by: Chris Thunell | last post by:
I have created several grids dynamically and have added them to different HTML placeholders on a vb.net web form. The grids and controls within them come up and view beautifully when the web page...
1
by: Jeffrey Todd | last post by:
I have successfully created functionality that mostly models what I'm trying to do - which is dynamically insert controls into a user control (ascx), and insert validation controls, also...
6
by: Alan Silver | last post by:
Hello, I have a placeholder, which gets a user control added in when the page first loads. This user control contains a dropdownlist, and I would like to get hold of the value of this drop down...
2
by: Raymond Du | last post by:
Hi, I need to find a way to place multiple textboxes and other controls dynamically on a web form, I tried to put a placeholder on a form then create and add controls dynamically into the place...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.