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
}
相关文章
相关标签/搜索