请教 BearRui (私聊发不出去)
********************************
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="lingliao.aspx.cs" Inherits="wang_chuku_lingliao" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="Label1" runat="server" Text="佳盛领料系统" style="left: 363px; position: relative; top: 0px"></asp:Label>
<hr/>
<br />
<asp:Label ID="Label2" runat="server" Font-Size="10pt" Style="left: 47px; position: relative;
top: 0px" Text="编号:"></asp:Label>
<asp:TextBox ID="bianhao2" runat="server" Font-Size="10pt" Style="left: 71px; position: relative;
top: 0px"></asp:TextBox>
<asp:Label ID="Label3" runat="server" Font-Size="10pt" Style="left: 108px; position: relative;
top: -4px" Text="刀模类型:"></asp:Label>
<asp:TextBox ID="leixin" runat="server" Style="left: 121px; position: relative; top: -1px"></asp:TextBox><br />
<br />
<asp:Label ID="Label4" runat="server" Font-Size="10pt" Style="left: 45px; position: relative;
top: 0px" Text="计划:"></asp:Label>
<asp:TextBox ID="jihua" runat="server" Font-Size="10pt" Style="left: 67px; position: relative;
top: 0px"></asp:TextBox>
<asp:Label ID="Label5" runat="server" Font-Size="10pt" Style="left: 132px; position: relative;
top: -3px" Text="型体:"></asp:Label>
<asp:TextBox ID="xingti" runat="server" Font-Size="10pt" Style="left: 148px; position: relative;
top: 0px"></asp:TextBox><br />
<br />
<asp:Label ID="Label6" runat="server" Font-Size="10pt" Style="left: 33px; position: relative;
top: 0px" Text="指示卡:"></asp:Label>
<asp:TextBox ID="zhishika" runat="server" Font-Size="10pt" Style="left: 54px; position: relative;
top: 0px"></asp:TextBox>
<asp:Label ID="Label7" runat="server" Font-Size="10pt" Style="left: 119px; position: relative;
top: -3px" Text="部位:"></asp:Label>
<asp:TextBox ID="buwen" runat="server" Font-Size="10pt" Style="left: 136px; position: relative;
top: -2px"></asp:TextBox><br />
<br />
<br />
<asp:Button ID="Button1" runat="server" Style="left: 247px; position: relative; top: -5px"
Text="搜索" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Style="left: 295px; position: relative; top: -6px"
Text="重置" OnClick="Button2_Click" /><br />
<br />
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
CellPadding="3" CellSpacing="2" Font-Size="10pt" OnPageIndexChanging="GridView1_PageIndexChanging"
OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound"
Style="border-left-color: blue; page-break-before: auto; border-bottom-color: blue;
page-break-after: auto; vertical-align: middle; overflow: scroll; width: 95%;
border-top-color: blue; height: 20px; text-align: center; border-right-color: blue" OnRowCreated="GridView1_RowCreated">
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" Width="20px" />
<Columns>
<asp:BoundField DataField="DepositingID" HeaderText="编号"/>
<asp:BoundField DataField="刀模类型" HeaderText="刀模类型" />
<asp:BoundField DataField="进货时间" HeaderText="进货时间" />
<asp:BoundField DataField="计划" HeaderText="计划" />
<asp:BoundField DataField="型体" HeaderText="型体" />
<asp:BoundField DataField="指示卡" HeaderText="指示卡" />
<asp:BoundField DataField="部位" HeaderText="部位" />
<asp:BoundField DataField="w3" HeaderText="3" />
<asp:BoundField DataField="w3t" HeaderText="3t" />
<asp:BoundField DataField="w4" HeaderText="4" />
<asp:BoundField DataField="w4t" HeaderText="4t" />
<asp:BoundField DataField="w5" HeaderText="5" />
<asp:BoundField DataField="w5t" HeaderText="5t" />
<asp:BoundField DataField="w6" HeaderText="6" />
<asp:BoundField DataField="w6t" HeaderText="6t" />
<asp:BoundField DataField="w7" HeaderText="7" />
<asp:BoundField DataField="w7t" HeaderText="7t" />
<asp:BoundField DataField="w8" HeaderText="8" />
<asp:BoundField DataField="w8t" HeaderText="8t" />
<asp:BoundField DataField="w9" HeaderText="9" />
<asp:BoundField DataField="w9t" HeaderText="9t" />
<asp:BoundField DataField="w10" HeaderText="10" />
<asp:BoundField DataField="w10t" HeaderText="10t" />
<asp:BoundField DataField="w11" HeaderText="11" />
<asp:BoundField DataField="w11t" HeaderText="11t" />
<asp:BoundField DataField="w12" HeaderText="12" />
<asp:BoundField DataField="w12t" HeaderText="12t" />
<asp:BoundField DataField="w13" HeaderText="13" />
<asp:BoundField DataField="w14" HeaderText="14" />
<asp:BoundField DataField="w15" HeaderText="15" />
<asp:BoundField DataField="录入时间" HeaderText="录入时间" >
<ItemStyle Width="100px" />
</asp:BoundField>
<asp:BoundField DataField="录入人" HeaderText="录入人" />
<asp:BoundField DataField="备注" HeaderText="备注" Visible="False" />
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="lingliao"
Text="领料" CommandArgument=<%#Eval("DepositingID")%> ></asp:LinkButton>
<%-- <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="lingliao"
Text="领料" ></asp:LinkButton>--%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<br />
[解决办法]
事件写错了,应该是GridView1_RowDataBound
下次不要贴这么多代码,看着晕,贴关键就可以了