asp.net的GridView控件的onrowdeleting属性怎么出错显示为找不到可接受类型。。。呢
错误1“ASP.customer_aspx”不包含“GridView1_RowDeleting”的定义,并且找不到可接受类型为“ASP.customer_aspx”的第一...
错误 1 “ASP.customer_aspx”不包含“GridView1_RowDeleting”的定义,并且找不到可接受类型为“ASP.customer_aspx”的第一个参数的扩展方法“GridView1_RowDeleting”(是否缺少 using 指令或程序集引用?) F:\CustomerManagementSystem\WebSite\Customer.aspx 9
展开
推荐于2016-01-16 · 知道合伙人互联网行家
关注
展开全部
你已经在.aspx文件中声明了GridView1事件。
<asp:GridView ID="GridView1" runat="server" Height="298px" AllowPaging="true" AutoGenerateColumns="false" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnPageIndexChanged="GridView1_PageIndexChanging" HorizontalAlign="Center" OnRowDeleting="GrivView1_RowDeleting" BorderStyle="None" OnDataBound="GridView1_RowDataBaund">
这是声明部分:
OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
OnPageIndexChanged="GridView1_PageIndexChanging"
OnRowDeleting="GrivView1_RowDeleting"
OnDataBound="GridView1_RowDataBaund"
双引号之间是事件名称。
所以在.cs文件中也在定义这些事件。
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
{
}
protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
{
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
}
<asp:GridView ID="GridView1" runat="server" Height="298px" AllowPaging="true" AutoGenerateColumns="false" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnPageIndexChanged="GridView1_PageIndexChanging" HorizontalAlign="Center" OnRowDeleting="GrivView1_RowDeleting" BorderStyle="None" OnDataBound="GridView1_RowDataBaund">
这是声明部分:
OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
OnPageIndexChanged="GridView1_PageIndexChanging"
OnRowDeleting="GrivView1_RowDeleting"
OnDataBound="GridView1_RowDataBaund"
双引号之间是事件名称。
所以在.cs文件中也在定义这些事件。
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
{
}
protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
{
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
}
追问
那些时间名称是怎么来的呢?是双击那个产生的吗?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询