日期:2014-05-16  浏览次数:20511 次

asp.net 变量名 '@original_Category' 已声明。变量名在查询批次或存储过程内部必须唯一。 “,”附近有语法错误。
首先我是用GridView控件直接编辑的小白.

没有在CS文件里写过代码.也不懂怎么传值.

麻烦大神们发代码就发aspx页面形式的.

我先把代码奉上,然后说一下我如何修改.
[code=csharp] 
<省略******>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:Button ID="Button1" runat="server" Text="更新" />
        <asp:Button ID="Button2" runat="server" Text="添加" />
        <asp:GridView  Font-Size="14px"   ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataSourceID="SqlDataSource1" DataKeyNames="ID">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" ReadOnly="True" />
                <asp:BoundField DataField="Category"    HeaderText="CategoryID" SortExpression="Category" />
                <asp:BoundField DataField="Variety" HeaderText="Variety" SortExpression="Variety" />
                <asp:BoundField DataField="Color"      HeaderText ="ColorID" SortExpression="Color" />
                <asp:BoundField DataField="WearLayer"   HeaderText="WearLayerID" SortExpression="WearLayer" />
                <asp:BoundField DataField="Thickness" HeaderText="ThicknessID" SortExpression="Thickness" />
                <asp:BoundField DataField="Type" HeaderText="TypeID" SortExpression="Type" />
                <asp:BoundField DataField="Repertory" HeaderText="Repertory" SortExpression="Repertory" />
                <asp:BoundField DataField="Specification" HeaderText="Specification" SortExpression="Specification" />
                <asp:BoundField DataField="Square" HeaderText="Square" SortExpression="Square" />
                <asp:BoundField DataField="RouteSquare" HeaderText="RouteSquare" SortExpression="RouteSquare" />
                <asp:BoundField DataField="Date"  HeaderText="Date" SortExpression="Date" />
        &