'gdPartReg_RowDataBound'不是'ASP.webform3_aspx'的成员 [英] 'gdPartReg_RowDataBound' is not a member of 'ASP.webform3_aspx'
问题描述
我很困惑为什么我的代码不接受任何诸如
的gridview属性.
OnRowDataBound ="gdPartReg_RowDataBound"
OnRowDeleting ="gdPartReg_RowDeleting"
OnRowCreated ="gdPartReg_RowCreated"
等.
如何解决呢?
这是我的页面指令:
I am quite confuse why my code does not accept any gridview properties like
OnRowDataBound = "gdPartReg_RowDataBound"
OnRowDeleting = "gdPartReg_RowDeleting"
OnRowCreated = "gdPartReg_RowCreated"
and etc..
How to solve this?
This is my page directive :
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site1.Master" CodeBehind="InternalRegis.aspx.vb" Inherits="QFMSWeb.InternalRegis" %>
这是背后的代码标头
This is header of code behind
Public Class InternalRegis
Inherits System.Web.UI.Page
我已经将
I have changed
Inherits="QFMSWeb.InternalRegis"
更改为
Inherits="InternalRegis"
,但是它无法加载页面.对于您的信息,InternalRegis.aspx在Forms文件夹中.这有什么关系吗?
编辑----
这是gridview代码:
but it cannot load the page. For your info, InternalRegis.aspx is in Forms folder. Does it has anything to do with this?
Edit ----
This is gridview code:
<asp:GridView ID="gdShop" runat="server" AutoGenerateColumns="False"
BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px"
CellPadding="4" CellSpacing="2" ForeColor="Black" Width="430px" OnRowCreated="gdPartReg_RowCreated" OnRowDeleted = "gdPartReg_RowDeleting">
<columns>
<asp:TemplateField>
<itemtemplate>
<asp:CheckBox ID="cbSH" runat="server" />
</itemtemplate>
<asp:BoundField DataField="DEPT" HeaderText="Dept" />
<asp:BoundField DataField="EMPID_T" HeaderText="Emp. ID" />
<asp:BoundField DataField="NAME_T" HeaderText="Name" />
</columns>
<footerstyle backcolor="#CCCCCC" />
<HeaderStyle BackColor="Black" BorderColor="White" Font-Bold="True"
ForeColor="White" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
<pagerstyle backcolor="#CCCCCC" forecolor="Black" horizontalalign="Left" />
<rowstyle backcolor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<sortedascendingcellstyle backcolor="#F1F1F1" />
<sortedascendingheaderstyle backcolor="#808080" />
<sorteddescendingcellstyle backcolor="#CAC9C9" />
<sorteddescendingheaderstyle backcolor="#383838" />
推荐答案
是否检查过是否有继承同一类的CS页面.
谢谢
灰烬
Have you checked is there any more cs page which inherits the same class.
Thanks
Ashish
这篇关于'gdPartReg_RowDataBound'不是'ASP.webform3_aspx'的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!