473,770 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listcontrol on placeholder does not maintain state

I have developed a form which dynamically builds textbox, radiobuttonlist ,
checkboxlist controls from parameters in a table, and somehow manages to
maintain state (of data keyed in by user). However, the listbox that i
invoke on click of a help button does not maintain state (i am not
re-loading the list on postback , which is a usual problem). Does anybody
have any idea what could be the issue ? The only asp control i have defined
in the aspx page is the placeholder. All controls are being placed
dynamically on this placeholder. Only the listbox fails to maintain state,
though there is a autopostback = true on 'selectedindexc hanged' event.

Thanks.


Nov 17 '05 #1
1 1504
R
If you are creating controls at runtime you need to do so in LoadViewState
otherwise the events will not get hooked up.

R
"chak" <r_************ @hotmail.com> wrote in message
news:#Y******** ******@TK2MSFTN GP10.phx.gbl...
I have developed a form which dynamically builds textbox, radiobuttonlist ,
checkboxlist controls from parameters in a table, and somehow manages to
maintain state (of data keyed in by user). However, the listbox that i
invoke on click of a help button does not maintain state (i am not
re-loading the list on postback , which is a usual problem). Does anybody
have any idea what could be the issue ? The only asp control i have defined in the aspx page is the placeholder. All controls are being placed
dynamically on this placeholder. Only the listbox fails to maintain state,
though there is a autopostback = true on 'selectedindexc hanged' event.

Thanks.

Nov 17 '05 #2

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

Similar topics

1
1899
by: Vit | last post by:
Hi. I'd like to pass as a parameter of class method reference to ListControl (ListBox or ComboBox). Here is my call: public DoSomething(ListControl lc){} It's ok with that, but lc does not have methods like lc.BeginUpdate; lc.EndUpdate but ListBox and ComboBox does have such a methods. I don't like two methods like
3
2488
by: Wee Bubba | last post by:
2 questions please. 1) if i make a placeholder invisible or remove it programmatically does that mean its contents wont get loaded. e.g. lets say i had a heavy datagrid within the placeholder which took a few seconds to load. if i made the placeholder invisible does that mean the grid would not get loaded at all so the page would load quicker? 2) can you remove a placeholder programmatically?
1
5378
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 question is when the button is clicked and a postback is performed, the controls that were in the placeholder no longer appears on the screen! Am I doing something wrong here? Why are the controls back on the screen eventhough they have enable view...
2
2027
by: Mark | last post by:
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
3
1724
by: Elad Volpin | last post by:
Can someone please explain this: I created a new webform with a PlaceHolder and a Button. My Page_Load contains the following code: private void Page_Load(object sender, System.EventArgs e) { ListControl l = null; ListItem item = new ListItem("a", "b");
2
1016
by: Mike Caputo | last post by:
Does anyone know why the ListControl base class doesn't have an Items property in Windows Forms, but does in Web Forms? This seems kind of pointless and is really annoying when trying to write a generic procedure for adding items to a ListControl in Windows Forms (I know I could use the DataSource property, but I need to be able to add and remove). Anyway, I can work around it, but I'm really curious to know why that's the case. Thanks....
2
3494
by: Vishal Gupta | last post by:
Hi all, I have a placeholder control on an ASPX page. I dynamically add a few button control and label control to the placeholder from code - all is well with the world. But on post back the control disappears from the placeholder. Am I missing something here Please help
11
7919
by: Joseph Geretz | last post by:
I've been looking at two approaches for the maintenance of Session state for a Web Service application. One approach uses the old familiar Session object which I've used in the past for Web applications. As far as I can see, the Session approach is non-standard since Web Services are supposed to be agnostic with respect to their clients. It seems that cookies are outside the Web Service standard; therefore, such a Web Service application...
55
6247
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in C# in some way? Or maybe no, because it is similar to a global variable (with its scope restricted) which C# is dead against? Zytan
0
9617
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10257
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10037
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8931
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2849
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.