Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reference a Control Inside a WebPartZone
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Reference a Control Inside a WebPartZone
Miscellaneous
Thread ID:
01145082
Message ID:
01145082
Views:
91
I want to use a dropdown value as a Data Object Control Parameter where the dropdown
and the target GridView are inside a WebPartZone and the DataObject is outside the
zone at the bottom of the page. I need the proper syntax that will find the dropdown
inside a webpartzone template.

I'm getting "Could not find control 'DropDownCategories' in ControlParameter 'catid'"

DropDownCategories is inside a webpartzone template:
<asp:WebPartZone ID="WebPartZone1"> 
<ZoneTemplate>
<asp:DropDownList  Title="Product Categories" ID="DropDownCategories" 
runat="server" AutoPostBack="True" DataSourceID="Categories" DataTextField="CategoryName"
DataValueField="CategoryName"></asp:DropDownList>
</ZoneTemplate> 
</asp:WebPartZone> 
The ObjectDataSource is outside the webpartzone at the bottom of the page:
<asp:ObjectDataSource ID="ProductsByCategory" runat="server" InsertMethod="Insert"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetProductsByCategory"
TypeName="productsTableAdapters.ProductsByCategoryTableAdapter">

<SelectParameters>
<asp:ControlParameter ControlID="DropDownCategories" DefaultValue="1" Name="catid"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters> 

</asp:ObjectDataSource> 
ControlID in the ObjectDataSource is not found. How can I reference the dropdown?

ControlID="DropDownCategories"

WebPartZone1.DropDownCategories does not work...
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Reply
Map
View

Click here to load this message in the networking platform