Datakeyname - updatecommand

VBdotnet2005 used Ask the Experts™
How can I update my data using DataKeyNames="RefID" when using <UpdateParameters>

 <asp:GridView ID="GridView3" runat="server" AllowPaging="True"
                    AllowSorting="True" AlternatingRowStyle-Wrap="True" AutoGenerateColumns="False"
                    AutoGenerateEditButton="True" DataKeyNames="RefID"
                    DataSourceID="SqlDataSource2" Font-Size="Small" FooterStyle-Font-Size="Medium"
                    PageSize="10" Width="698px">


<asp:BoundField DataField="RefID" HeaderText="RefID"
                            SortExpression="RefID" Visible="false" />

  <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                ConnectionString="<%$ ConnectionStrings:dbdoneConnectionString %>"        
                              SelectCommand= "my sp1" SelectCommandType="StoredProcedure"
                              UpdateCommand="my sp2" UpdateCommandType="StoredProcedure">   < parameter is where datakeyname = Refid


<UpdateParameters>  < I am have storeprocedure for this
                <asp:Parameter Name="RefID" String="RefID" />  ?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You have to specify them manually.
            <asp:Parameter Name="The_FIELD_NAME_IN_DATABASE" DbType="Int32" />

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial