TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cenk Isik
NA
44
30.5k
GridView item template linkbutton catch on code behind
Aug 3 2012 2:33 AM
Hi all,
I have a gridview in my asp.net project and i used item template like;
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID = "lnkSil" runat="server" CommandName="bla"
CommandArgument='<%# ((GridViewRow) Container).RowIndex %>' Text= "Sil" ></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
And I want to catch this from code behind and i used below code ;
((Button)e.Row.Cells[1].Controls[0]).Attributes.Add("onclick", "return confirm('Bu kaydi silmek istediginizden emin misiniz?')");
but I'm failed how can i catch this controls on code behind like this
also i tried
((LinkButton)e.Row.Cells[1].Controls[0]).Attributes.Add("onclick", "return confirm('Bu kaydi silmek istediginizden emin misiniz?')");
Reply
Answers (
0
)
How can i use dropdownlist control in gridview
Using Paging for huge amount of data (Need SQL and Function)