GridView我放了個(gè)按鈕,可怎么點(diǎn)他都不觸發(fā)RowCommand事件
2 回答

慕田峪4524236
TA貢獻(xiàn)1875條經(jīng)驗(yàn) 獲得超5個(gè)贊
樓主,你是不是在web.config里把viewstate禁用了.如果是的話在頁(yè)面里單獨(dú)開起來(lái)就好了.
<%@ Page Title="" Language="C#" MasterPageFile="~/Archives/Archives.master" AutoEventWireup="true" EnableEventValidation ="false" CodeFile="ComeOutWith.aspx.cs" Inherits="Archives_ComeOutWith" EnableViewState="true" %>
或者是你每次回發(fā)都重新綁定了數(shù)據(jù),如果是的話,你綁定數(shù)據(jù)應(yīng)該加在:
if(!IsPostBack){
//databind
}
- 2 回答
- 0 關(guān)注
- 403 瀏覽
添加回答
舉報(bào)
0/150
提交
取消