473,387 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

EditCommandColumn Button ID

A Web Form has the following DataGrid:

<asp:DataGrid ID="dgProducts" OnEditCommand="AddToCart"
EnableViewState="true" runat="server">
<Columns>
<%-- some TemplateColumns come here--%>
<asp:EditCommandColumn EditText="ADD TO CART" HeaderText="ADD TO CART"/
>
</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.

Mar 6 '07 #1
0 959

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Maziar Aflatoun | last post by:
Hi everyone, Does anyone know how I can add a CSS (Ex. button1 ) to the following Edit button is ASP .NET? <asp:EditCommandColumn ButtonType="PushButton" EditText="Edit" CancelText="Edit"...
4
by: RobS | last post by:
Can anyone answer this question: How can I disable validation when edit column update button is pressed. Can it be done for the whole grid? Regards, Robert
1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
0
by: Maziar Aflatoun | last post by:
Hi everyone, Does anyone know how I can add a CSS (Ex. button1 ) to the following Edit button is ASP .NET? <asp:EditCommandColumn ButtonType="PushButton" EditText="Edit" CancelText="Edit"...
0
by: tshad | last post by:
I have a table which works fine using the following templates: ********************************************************************************** <asp:TemplateColumn HeaderText="Answer">...
7
by: needin4mation | last post by:
I have this in my DataGrid's ItemCreated event: TableCell myChangeCell = e.Item.Cells; LinkButton myChangeButton = (LinkButton) myTableCell.Controls; myChangeButton.Text="Hello!"; I am trying...
4
by: Sourav Dutta Gupta | last post by:
I want to change the "scr" like src='images/Edit.ICO' to src='images/XYZ.ICO' dynamically based on some condition. My EditCommandColumn: <asp:EditCommandColumn ButtonType="LinkButton"...
0
by: rn5a | last post by:
Consider the following DataGrid: <asp:DataGrid ID="dgCart" OnEditCommand="Cart_EditCommand" OnItemCommand="Cart_ItemCommand"....AllowSorting=true........> <Columns> <asp:TemplateColumn>...
0
by: RN1 | last post by:
A Form has a few fields along with a Submit button & a DataGrid. The fields & the Submit Button are encapsulated in a Panel named pnlDataEntry & the DataGrid is encapsulated in a Panel named...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.