EditCommandColumn Button ID

R

rn5a

A Web Form has the following DataGrid:

<asp:DataGrid ID="dgProducts" OnEditCommand="AddToCart"
EnableViewState="true" runat="server">
<Columns>
</Columns>
</asp:DataGrid>

The button/link that gets created by the EditCommandColumn - how do I
get its ID?

Since the DataGrid is bound to a database table, each of the rows have
the *ADD TO CART* button/link. How do I get the ID of each of these
*ADD TO CART* buttons/links?

Actually my main intention is to disable the *ADD TO CART* buttons/
links immediately after they are clicked so as to ensure that users
don't repost the same data again & again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top