weixin_33709590 2016-06-13 09:22 采纳率: 0%
浏览 149

ListSearchExtender控件

I try to use this ajax control

  <ajax:ListSearchExtender  ID="lseregiondrop" runat="server" TargetControlID="regiondrop"
  PromptPosition="Top" QueryPattern="Contains" PromptText="[Select Region]">
</ajax:ListSearchExtender>

when i bulild error shows

The control with ID 'lseregiondrop' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it

now when i place script manager like this

 <asp:ScriptManager ID="ScriptManager1" runat="server">

<asp:DropDownList ID="regiondrop" runat="server" AutoPostBack="True" 
    onselectedindexchanged="regiondrop_SelectedIndexChanged">
</asp:DropDownList>


<ajax:ListSearchExtender  ID="lseregiondrop" runat="server" TargetControlID="regiondrop"
  PromptPosition="Top" QueryPattern="Contains" PromptText="[Select Region]">
</ajax:ListSearchExtender>

 </asp:ScriptManager>

when i build this shows error

Type 'System.Web.UI.ScriptManager' does not have a public property named 'DropDownList'.
  • 写回答

1条回答 默认 最新

  • ?yb? 2016-06-14 14:05
    关注

    You need to close ScriptManager tag:

    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    
    评论

报告相同问题?