Hello.
I have a gridview with an ImageButton that acts as an Update Command to a DataSource.
and the SP works if i execute it in the server with parameters, but not through the ImageButton.

I Suspect that the Parameters arn't bein sent because if i set a Default Value
that update function works perfectly.
the SP adds the parameters to a string and being executed as a query.
(1 parameter is a column name)

This is The DataSource:

<asp:SqlDataSource ID="sds_view" runat="server" ConnectionString= ( connection string here)
SelectCommand="spView" SelectCommandType="StoredProcedure" UpdateCommand="spAccept" UpdateCommandType="StoredProcedure">
<UpdateParameters>
<asp:Parameter Name="ID" Type"String" />
<asp:Parameter Name="TotalDays" Type"Int32" />
<asp:Parameter Name="RequestType" Type"String" />
<asp:Parameter Name="Num" Type"Int32" />

</UpdateParameters>

i manualy wrote the code so didn't write a deletecommand as well,
the delete works perfectly and written the same way.

GridView :

<anthem:GridView ID="GridViewRequests" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataSourceID="sds_view" DataKeyNames="ID,TotalDays,RequestType,Num" CellPadding="4" GridLines="Vertical" PageSize="25" AutoUpdateAfterCallBack="True" UpdateAfterCallBack="True">

Google has failed me so i come to you in a plea.

Thanks in advance,
Eric

Have you bind these parameters with EditTemplate items?

No the parameters are BoundFields from the gridview.
and i don't use a edit button,
i am not trying to update the current column i am only using the command as update
while the SP is updating a whole other Table.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.