Click here to Skip to main content
15,886,693 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
// after <asp:Gridview />

XML
<columns>
                            <asp:BoundField DataField="SrNo" Visible="false" ItemStyle-ForeColor="Black">
                            <asp:BoundField DataField="Name" HeaderText="NAME" ItemStyle-ForeColor="Black">
                            <asp:BoundField DataField="Birth" HeaderText="BIRTH" ItemStyle-ForeColor="Black">
                            
                            <asp:BoundField DataField="Age" HeaderText="AGE" ItemStyle-ForeColor="Black">
                            <asp:TemplateField HeaderText="EDIT?">
                                <itemtemplate>
                                    <asp:LinkButton ID="lnkEdit" ForeColor="black" CommandName="Edit" CommandArgument='<%# Eval("SrNo") %>'
                                        runat="server" Text="Edit">
                                    
                                </itemtemplate>
                            
                            <asp:TemplateField HeaderText="DELETE?">
                                <itemtemplate>
                                    <asp:LinkButton ID="lnkDelete" OnClientClick="return confirm('Are you sure, you want to delete Record?');return false;"
                                        ForeColor="black" CommandName="Delete" CommandArgument='<%# Eval("SrNo") %>'
                                        runat="server" Text="Delete">
                                    
                                </itemtemplate>
                            
                        </columns>
Posted
Updated 14-Jan-11 23:55pm
v3
Comments
Estys 15-Jan-11 3:52am    
Insert a "code block" when pasting code.
What is the problem. Just asking "is it right" is not very useful.
OriginalGriff 15-Jan-11 4:11am    
Reason for my vote of 1: Please stop asking meaningless questions: "Is it right?" is not a lot of use when we do not know what you are trying to do.

Yes the HTML looks ok but the gridview bind would need more code to show result!

You need to make more effort and would suggest you to stop flooding forum with such questions. Please try and be specific in posting issues.
 
Share this answer
 
Not a question, and removed "(Is it right)" from title. We can't tell you if your code is "right", because we don't have (nor do we want) all of your code. If it compiles, run it under the debugger. If it's not right, you'll know in short order.
 
Share this answer
 

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