A
Alan Silver
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
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