GridView我放了個按鈕,可怎么點他都不觸發RowCommand事件
2 回答

慕田峪4524236
TA貢獻1875條經驗 獲得超5個贊
樓主,你是不是在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
}
- 2 回答
- 0 關注
- 408 瀏覽
添加回答
舉報
0/150
提交
取消