Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何避免无效回发或回调参数错误?_C#_Asp.net_Listview - Fatal编程技术网

C# 如何避免无效回发或回调参数错误?

C# 如何避免无效回发或回调参数错误?,c#,asp.net,listview,C#,Asp.net,Listview,我在一个页面中有母版页和用户控件。页面中有listview。我试图使用itemcommand,但它引发错误-回发或回调参数无效。 (当我删除用户控件时,它将开始工作) 在问题中编写代码在问题中编写代码 <asp:ListView ID="lvProducts" runat="server" OnItemDataBound="lvProducts_ItemDataBo

我在一个页面中有母版页和用户控件。页面中有listview。我试图使用itemcommand,但它引发错误-回发或回调参数无效。 (当我删除用户控件时,它将开始工作)



在问题中编写代码在问题中编写代码
                      <asp:ListView ID="lvProducts" runat="server"                                        OnItemDataBound="lvProducts_ItemDataBound"                    OnItemCommand="lvProducts_ItemCommand">;
                    <ItemTemplate>
                        <a href='<%# Eval("URL") %>'>
                            <div class="product-grid">
                                <div class="more-product"><span> </span></div>
                                <div class="product-img b-link-stripe b-animate-go  thickbox">

                                    <img src='<%# Eval("ImageURL") %>' class="img-responsive" alt="">
                                    <div class="b-wrapper">
                                        <h4 class="b-animate b-from-left  b-delay03">
                                            <a href='<%# Eval("URL") %>'> + </a>
                                        </h4>
                                    </div>
                                </div>

                                <div class="product-info simpleCart_shelfItem">
                                    <div class="product-info-cust prt_name">

                                        <h4><%# Eval("Heading") %></h4>

                                        <span class="item_price"><%# Eval("OfferPrice") %> </span>
                                        <div class="ofr">

                                            <p class="pric1"><del><%# Eval("MRP") %></del></p>

                                        </div>


                                        <asp:TextBox ID="txtQty" runat="server" CssClass="item_quantity" TextMode="Number" Visible="false"></asp:TextBox>
                                        <asp:Button ID="btnAddToCart" runat="server"   Text="+" CssClass="item_add items" CommandName="AddToCart" />
                                        <asp:LinkButton ID="a" runat="server" Text="test"></asp:LinkButton>
                                        <div class="clearfix"> </div>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </ItemTemplate>
                </asp:ListView>