母版页多个ContentPlaceHolder间控件通讯问题
我定义了一个母版页,有两个ContentPlaceHolder。在第一个ContentPlaceHolder中纺织了一个DropDownList控件,在第二个里边防治了一个gridview和一个objectdatasource控件。目的是想通过 dropdownlist控件给objectdatasource传递参数,进而更新gridview中的数据。页面aspx代码如下:
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
</asp:DropDownList>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" CssClass="datatab"
AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
DataKeyNames="id">
......
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="Delete" SelectMethod="Get" TypeName="Spark.DAL.Users">
<DeleteParameters>
<asp:Parameter Name="id" Type="String" />
</DeleteParameters>
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" DefaultValue="" Name="ked"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
但在运行是,却提示:未能在 ControlParameter“ked”中找到控件“DropDownList1”。求解。
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
</asp:DropDownList>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" CssClass="datatab"
AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
DataKeyNames="id">
......
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="Delete" SelectMethod="Get" TypeName="Spark.DAL.Users">
<DeleteParameters>
<asp:Parameter Name="id" Type="String" />
</DeleteParameters>
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" DefaultValue="" Name="ked"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
但在运行是,却提示:未能在 ControlParameter“ked”中找到控件“DropDownList1”。求解。
...全文
相关推荐
PopupWin控件的使用说明
PopupWin控件的使用说明PopupWin控件PopupWin控件的使用说明的使用说明PopupWin控件的使用说明
学术期刊审稿状态监控系统设计与实现
学术稿件审稿状态管理是科研出版流程中的关键环节,涉及多平台协议解析、动态页面抓取、语义歧义消解等核心技术。其原理在于构建跨系统、可验证的状态感知链路,通过HTTP指纹识别、结构化规则引擎与可信变更校验,解决Elsevier、Springer等平台的协议异构性与身份隔离问题。技术价值体现在大幅压缩人工跟踪耗时、支撑邮件通知合规性(OAuth2.0、哈希留痕、MIME封装)及Windows原生集成(托盘语义图标、MAPI调用、Office COM监听)。典型应用于高校学报、SCI期刊编辑部等学术协作场景,为科研
Ajax Control Toolkit 34个服务器端控件
Ajax Control Toolkit 34个服务器端控件
2026安卓开发从零实战指南:环境搭建、核心基础与避坑干货(适配新版Android_Studio).pdf
2026安卓开发从零实战指南:环境搭建、核心基础与避坑干货(适配新版Android_Studio).pdf
如何实现科研成果转化率的有效提升与技术市场精准对接?.docx
如何实现科研成果转化率的有效提升与技术市场精准对接?


