GridView不执行RowCommand事件

web.config里把viewstate禁用了.如果是的话在页面里单独开起来就好了.
<%@ Page Title="" Language="C#" MasterPageFile="~/Archives/Archives.master" AutoEventWireup="true" EnableEventValidation ="false" CodeFile="ComeOutWith.aspx.cs" Inherits="Archives_ComeOutWith" EnableViewState="true" %>

或者是你每次回发都重新绑定了数据,如果是的话,你绑定数据应该加在:
if(!IsPostBack){
//databind
}
原文地址:https://www.cnblogs.com/smile-wei/p/7445558.html