Click here to Skip to main content
16,018,818 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Can i please know how to use on click event of a hyperlink present in one of Gridview column but i am unable to do it.
I want to throw an warning message on click of the Delete Hyperlink, something like "Are you sure ?

Here is the code below
XML
<asp:GridView ID="gvData"  runat="server" Height="159px" Width="511px"
                    AutoGenerateColumns="False"
                    onselectedindexchanged="gdvData_SelectedIndexChanged">
                    <Columns>
                        <asp:HyperLinkField Text="Delete" HeaderText="Delete" HeaderStyle-BackColor="#4EA600" HeaderStyle-ForeColor="White" />
                        <asp:HyperLinkField Text="Edit" HeaderText="Edit" HeaderStyle-BackColor="#4EA600" HeaderStyle-ForeColor="White"  NavigateUrl="~/Error_Correction.aspx" />
                        <asp:BoundField DataField="SOURCE_ENTITY" HeaderText="Source Entity" HeaderStyle-BackColor="#4EA600" HeaderStyle-ForeColor="White"/>
                        </Columns>
                   </asp:GridView>
Posted
Updated 1-Aug-13 18:29pm
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900