Are dynamically loaded controls preserved over a postback?
- From: Alan Silver <alan-silver@xxxxxxxxxxxx>
- Date: Mon, 8 Aug 2005 20:11:18 +0100
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 list form the calling page on postback. Can I do this? If I try and use FindControl on the placeholder, it can't find the dropdownlist.
I tried...
ShowCategory ctlShowCategory = (ShowCategory)plcCategoryDetails.Controls[0];
(where ShowCategory is the user control) but this gave the error...
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index
which sounds like the user control wasn't preserved in the placeholder over the postback.
Any ideas how I do this? Hope this was clear!! TIA
-- Alan Silver (anything added below this line is nothing to do with me) .
- Follow-Ups:
- Re: Are dynamically loaded controls preserved over a postback?
- From: Bruce Barker
- Re: Are dynamically loaded controls preserved over a postback?
- Prev by Date: Httpmodule still executed even if remove using <remove> config entry
- Next by Date: Re: Are dynamically loaded controls preserved over a postback?
- Previous by thread: Httpmodule still executed even if remove using <remove> config entry
- Next by thread: Re: Are dynamically loaded controls preserved over a postback?
- Index(es):
Relevant Pages
|
Loading