0

I have a website I'm developing and I am showing a GridView with a DetailsView when a row from the GridView is selected. 在 DetailsView 我有一个编辑按钮,可以让用户编辑一些信息。错误信息是:

必须声明标量变量“@original_FirstName”。

这是代码:

<asp:SqlDataSource ID="SqlDataSource1" runat="server"  
    ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" OldValuesParameterFormatString="original_{0}"  
    SelectCommand="SELECT * FROM aspnet_Membership ORDER BY [Email], [LastName], [Company]" 
    UpdateCommand="UPDATE aspnet_Membership SET [FirstName] = @FirstName, [LastName] = @LastName, [Company] = @Company, [PartsList] = @PartsList, 
                  [UserName] = @UserName, [Question] = @Question, [Answer] = @Answer, [Role] = @Role, [Comment] =@Comment
                  WHERE [FirstName] = @original_FirstName AND [LastName] = @original_LastName AND [Company] = @original_Company AND
                  [PartsList] = @original_PartsList AND [UserName] = @original_UserName AND [Question] = @original_Question AND
                  [Answer] = @original_Answer AND [Role] = @original_Role AND [Comment] =@original_Comment"> 
        <UpdateParameters> 
            <asp:Parameter Name="FirstName" Type="String" /> 
            <asp:Parameter Name="LastName" Type="String" /> 
            <asp:Parameter Name="Company" Type="String" /> 
            <asp:Parameter Name="PartsList" Type="String" /> 
            <asp:Parameter Name="UserName" Type="String" /> 
            <asp:Parameter Name="Password" Type="String" /> 
            <asp:Parameter Name="Email" Type="String" /> 
            <asp:Parameter Name="Question" Type="String" /> 
            <asp:Parameter Name="Answer" Type="String" /> 
            <asp:Parameter Name="Role" Type="String" /> 
            <asp:Parameter Name="Comment" Type="String" />                    
        </UpdateParameters> 
</asp:SqlDataSource> 
4

0 回答 0