Re: Are dynamically loaded controls preserved over a postback?
- From: "Bruce Barker" <brubar_nospamplease_@xxxxxxxxxx>
- Date: Mon, 8 Aug 2005 12:23:15 -0700
you have to recreate the dynamic comtrol on postback. there is no code in
the placeholder for this.
-- bruce (sqlwork.com)
"Alan Silver" <alan-silver@xxxxxxxxxxxx> wrote in message
kbQ$lsKW569CFwf$@nospamthankyou.spam">news:kbQ$lsKW569CFwf$@nospamthankyou.spam...
> 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: Alan Silver
- Re: Are dynamically loaded controls preserved over a postback?
- References:
- Are dynamically loaded controls preserved over a postback?
- From: Alan Silver
- Are dynamically loaded controls preserved over a postback?
- Prev by Date: Are dynamically loaded controls preserved over a postback?
- Next by Date: Re: Compiler error
- Previous by thread: Are dynamically loaded controls preserved over a postback?
- Next by thread: Re: Are dynamically loaded controls preserved over a postback?
- Index(es):
Relevant Pages
|