Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i want to use link buttons in my grid view so that i can define some event for my buttons.
but the problem is i dont know how to use it. i searched on google but it didn't help me.
please guide me by giving a simple example.....
Posted
Comments
[no name] 5-Sep-11 4:16am    
why you put this question twice..

In the grid view there is no events for link buttons by default,u can use hyper link buttons it has default events..I hope this is the solution for your problem.
 
Share this answer
 
Comments
Sachin gulati 3-Sep-11 6:03am    
no. actually i have already added link buttons through item template.
and defined rowcommand event for it
but its e.commandArgument doesn't hold any value. it remains "" null
pls suggest some easy example
hello sachin,

go to property of gridview.
then select particular event of gridview
name it and press enter key
then you transfer to code behind page
in the event type: response.redirect("___.aspx");
 
Share this answer
 
Comments
Sachin gulati 3-Sep-11 6:05am    
i have already defined its rowcommand event but its e.CommandArgument remains null. so it don't perform any action.
Hi Sachin,

LinkButton In Gridview

I hope ,it helps you.If you have any problem send me a query.
Have a good time!!!
 
Share this answer
 
<asp:LinkButton ID="lbtnEdit" runat="server" CommandName="Edit" Text="Edit" ForeColor="Blue" CommandArgument='value binded from database'/>



if u have doubt reply me fast ..i worked so many times in this
 
Share this answer
 
v3

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