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
}
相關文章
相關標籤/搜索