G
Gary
I have an asp.net 3.5 aspx page that references a site.master file with 3
asp:contentplaceholder sections in it. The main content section contains an
asp:repeater control and it's associated asp:ObjectDataSource. I'd like the
asp:Objectdatasource to be able to reference filter criteria controls in one
of the other asp:content sections.
Is this possible, or do I need to put the control results into the viewstate
and get them from there? Code snippet below reports error that "FilterHeld"
control doesn't exist:
<%@ Page Language="VB" MasterPageFile="~/Site.master" %>
<asp:Content ID="Nav" ContentPlaceHolderID="NavBottom" runat="server">
<asp:CheckBox ID="FilterHeld" runat="server" AutoPostBack="True"
EnableViewState="True" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:ObjectDataSource ID="ObjDS" runat="server"
SelectMethod="GetBLLJobs" TypeName="spJobsBLL">
<SelectParameters>
<asp:ControlParameter ControlID="FilterHeld" DefaultValue="False"
Name="Hold" PropertyName="Checked" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:Repeater ID="Rpt1" runat="server" DataSourceID="ObjDS">
<ItemTemplate>
<%#Eval("BatchID")%><br />
</ItemTemplate>
</asp:Repeater>
</asp:Content>
asp:contentplaceholder sections in it. The main content section contains an
asp:repeater control and it's associated asp:ObjectDataSource. I'd like the
asp:Objectdatasource to be able to reference filter criteria controls in one
of the other asp:content sections.
Is this possible, or do I need to put the control results into the viewstate
and get them from there? Code snippet below reports error that "FilterHeld"
control doesn't exist:
<%@ Page Language="VB" MasterPageFile="~/Site.master" %>
<asp:Content ID="Nav" ContentPlaceHolderID="NavBottom" runat="server">
<asp:CheckBox ID="FilterHeld" runat="server" AutoPostBack="True"
EnableViewState="True" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:ObjectDataSource ID="ObjDS" runat="server"
SelectMethod="GetBLLJobs" TypeName="spJobsBLL">
<SelectParameters>
<asp:ControlParameter ControlID="FilterHeld" DefaultValue="False"
Name="Hold" PropertyName="Checked" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:Repeater ID="Rpt1" runat="server" DataSourceID="ObjDS">
<ItemTemplate>
<%#Eval("BatchID")%><br />
</ItemTemplate>
</asp:Repeater>
</asp:Content>