asp:ControlParameter access control in different asp:Content block (Master Pages)
I am setting up an application with two content blocks: FiltersContent and MainContent.
I want to use a Reports.master to style the filters and results into their own blocks. The problem is that when I try to use a in the of a , something like:
<asp:SqlDataSource [...] >
<SelectParameters>
<asp:ControlParameter ControlID="statusFilter" DefaultValue="-1" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="startDateFilter" DefaultValue="01/01/1990" PropertyName="Text" />
<asp:ControlParameter ControlID="endDateFilter" DefaultValue="01/01/2070" PropertyName="Text" />
</SelectParameters>
</as开发者_开发问答p:SqlDataSource>
It is cannot find the control producing a error like
Could not find control 'statusFilter' in ControlParameter ''.
As soon as I move the filter controls into the 'Main'
<asp:Content ContentPlaceHolderId="MainContent" ... >
they work properly.
So my question is: Is it possible to access the controls from a SqlDataSource in a different Content block?
I think the syntax is:
<asp:ControlParameter ControlID="parentControl$Childcontrol" DefaultValue="-1" PropertyName="SelectedValue" />
精彩评论