在线等·~大侠看这段代码哪不对

aspx页面:

<asp:GridView ID="CompangStoreList" runat="server" AutoGenerateColumns="False" EnableModelValidation="True" ShowHeader="False"onrowcommand="CompangStoreList_RowCommand" >
            <Columns>
                <asp:BoundField DataField="StoreID" Visible="False" />
                <asp:BoundField DataField="StoreName" />
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:Button ID="btnLoggin" runat="server" CausesValidation="false" CommandName="Loggin" Text="Loggin" CommandArgument='<%# Bind("StoreID") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
</asp:GridView>

后台cs:

 protected void CompangStoreList_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Loggin")
            {
                STORE_ID = e.CommandArgument.ToString();
            }
        }

问题是  不会触发后台这个方法·

函数式编程
浏览 204回答 1
1回答

开心每一天1111

那就用linkbutton吧
打开App,查看更多内容
随时随地看视频慕课网APP