<asp:GridView ID= "MyList " AllowPaging= "true " PageSize= "10 " OnPageIndexChanged= "MyList_Page " runat= "server " Width= "500 " GridLines= "None " CellPadding= "2 " CellSpacing= "1 " Font-Size= "8pt " Font-Names= "宋体 " AutoGenerateColumns= "false " EnableViewState= "false " DataKeyNames= "id " OnRowDeleted= "MyDataGrid_Delete ">
<Columns>
<asp:ButtonField ItemStyle-Width= "150px " HeaderText= " " DataTextField= "shijian " />
<asp:HyperLinkField ItemStyle-Width= "400px " HeaderText= " " DataNavigateUrlFields= "id " DataNavigateUrlFormatString= "update.aspx?id={0} " DataTextField= "biaoti " Target= "_blank " />
<asp:ButtonField ItemStyle-Width= "100px " Text= "删除 " CommandName= "Delete " />
</Columns>
</asp:GridView>
*******************************************************************************************************************************************
public void MyList_Page(object sender, GridViewPageEventArgs e)
{
MyList.PageIndex= e.NewPageIndex;
DataBind();
}
*****************************************************************************************************************************
运行时候有错误:
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: CS0123: “MyList_Page”的重载均与委托“System.EventHandler”不匹配
源错误:
行 25: <td style= "width:608; ">
行 26: <div style= "text-align: center ">