Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
LinkButton event is not firing in DataGrid
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
suresh
11y
2.3k
1
Reply
Hi,
Below is the code the linkbutton is not firing the event.
<asp:DataGrid ID="user_info" DataKeyField="c_id" runat="server" >
<Columns>
<ItemTemplate>
<asp:LinkButton ID="lnkbtn" CommandName="cmdview" OnCommand="lnkbtn_Command" runat="server" Text="View" ></asp:LinkButton>
</ItemTemplate>
</Columns>
</asp:DataGrid>
protected void lnkbtn_Command(Object sender, CommandEventArgs e)
{
if (e.CommandName == "cmdview")
{
Response.Redirect("http://google.com");
}
}
Please help me,
Thanks
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Create admin and student login
How to load Data Fast when Click on pageIndex in GridView