标题:“ASP.demanage_aspx”并不包含“GridView1_RowDeleting”的定义
只看楼主
水晶心
Rank: 1
等 级:新手上路
帖 子:69
专家分:0
注 册:2010-7-27
结帖率:80%
已结贴  问题点数:20 回复次数:4 
“ASP.demanage_aspx”并不包含“GridView1_RowDeleting”的定义
<asp:Label ID="Label7" runat="server" Height="24px" Style="z-index: 108; left: 155px;
            position: absolute; top: 130px" Text="部门编号:" Width="83px"></asp:Label>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" OnRowDeleting="GridView1_RowDeleting" DataKeyNames = "did"
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966" BorderStyle="None"
            BorderWidth="1px" CellPadding="4" DataSourceID="SqlDataSource1"
            Height="242px" PageSize="8" Style="z-index: 109; left: 147px; position: absolute;
            top: 153px" Width="530px" >
            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
            <Columns>
                <asp:BoundField DataField="did" HeaderText="编号" ReadOnly="True" SortExpression="did" />
                <asp:BoundField DataField="dname" HeaderText="名称" SortExpression="dname" />
                <asp:BoundField DataField="dnum" HeaderText="人数" SortExpression="dnum" />
                <asp:CommandField ShowEditButton="True" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
            <RowStyle BackColor="White" ForeColor="#330099" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:kqConnectionString %>"
            SelectCommand="SELECT [did], [dname], [dnum] FROM [dep]" DeleteCommand="DELETE FROM [dep] WHERE [did] = @did" InsertCommand="INSERT INTO [dep] ([did], [dname], [dnum]) VALUES (@did, @dname, @dnum)" UpdateCommand="UPDATE [dep] SET [dname] = @dname, [dnum] = @dnum WHERE [did] = @did">
            
        </asp:SqlDataSource>
        &nbsp; &nbsp;
搜索更多相关主题的帖子: RowDeleting aspx demanage 定义 ASP 
2010-08-11 09:32
dgqstar
Rank: 1
等 级:新手上路
帖 子:2
专家分:5
注 册:2010-8-5
得分:5 
ASP.demanage_aspx.cs里没有GridView1_RowDeleting方法
2010-08-11 10:55
烟雨袅袅
Rank: 6Rank: 6
来 自:星空雨际
等 级:侠之大者
威 望:1
帖 子:430
专家分:494
注 册:2007-11-26
得分:5 
   <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" OnRowDeleting="GridView1_RowDeleting" DataKeyNames = "did"
 
OnRowDeleting="GridView1_RowDeleting"删除了或是添加 GridView1_RowDeleting方法
2010-08-11 13:48
foktime
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:奥斯维辛
等 级:贵宾
威 望:35
帖 子:795
专家分:2742
注 册:2009-9-4
得分:5 
有时候吧 这错误信息已经告诉你该怎么做了
2010-08-12 11:28
zl40650194
Rank: 1
等 级:新手上路
帖 子:4
专家分:9
注 册:2007-1-1
得分:5 
这很明显嘛,前台注册GridView1_RowDeleting事件了,后台没写事件处理啊
2010-08-12 17:02



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-315388-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.243768 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved