Asp.net 2.0错误转发器按钮

时间:2017-05-30 02:20:08

标签: javascript c# jquery asp.net vb.net

我正在尝试使用转发器并使用ajax而不是" EnableEventValidation='true'"但我在页面卸载时收到以下错误。当我点击转发器中的按钮时,repeater1_ItemCommand没有被引用

错误:

  

System.Collections.ListDictionaryInternal System.ArgumentException:   无效的回发或回调参数。事件验证已启用   在配置中使用或<%@   Page EnableEventValidation =" true" %GT;在一个页面

代码:

<asp:ToolkitScriptManager ID="MainSM" EnablePageMethods="true"  runat="server" ScriptMode="Release" LoadScriptsBeforeUI="true">
</asp:ToolkitScriptManager>

 <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
<ItemTemplate>
<table id="myTable" width="700" border="1" class = "mMMGrid" frame="box">
<th align=left>Page Image</th><th align=left>Page #</th><th align=left >Page Sequnce</th><tbody>
<tr>
  <td width="15%">
  <div id = "dPage" runat="server" >
   <asp:ImageButton ID="imbtnCourseLink" runat="server"  ImageUrl='<%#imPath(DataBinder.Eval(Container, "DataItem.ChunkFilePath"))%>' OnClick="imlink2"  Width="75px"  Height="75px"  /> 

    </div>
    </td>
    <td width="15%">
    <strong>Pages</strong> : <asp:label ID="lblPage" Text='<%# Eval("Page")%>' runat="server"></asp:label> <br/>
     </td>
     <td width="65%"> 
      <asp:ImageButton ID="imbtUp" runat="server" ImageUrl="~/SiteImages/go-up.png" Width="40" height="40" CommandName="UP" CommandArgument='<%# Eval("Page")%>'/>
      <asp:ImageButton ID="imbtDown" runat="server" ImageUrl="~/SiteImages/go-down.png" Width="40" Height="40" />

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <triggers>
    <asp:asyncpostbacktrigger controlid="imbtUp" eventname="Click" />
       <asp:asyncpostbacktrigger controlid="Repeater1" eventname="ItemCommand" />
    </triggers>
    </asp:UpdatePanel>
    <br /> 

 </td>
</tr>
</tbody>
</table>
</ItemTemplate>

</asp:Repeater>      

0 个答案:

没有答案