Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to access the caption (text) of linkbuttons in listview.

check this.
I am using this function on the onclick event of the linkbutton.
C#
protected void linkfolder_click(object sender, EventArgs e)
{
   linkbutton l = (linkbutton)sender;
   string folder = l.text;
}

But it is not working.

Please suggest something.

Can i use Listview1.findcontrol() method.

Please tell me how.
Posted
Updated 29-Nov-11 20:23pm
v3
Comments
RaisKazi 30-Nov-11 2:24am    
Edited: 1) Formatting 2) Correction of "pre" tag.

1 solution

What do you mean by not working? Link button is not raising event? or link button is raising event but the sender parameter in the function is not type of Linkbutton.

See this link if it serves the purpose
http://forums.asp.net/t/1348251.aspx[^]

Thanks,
Hemant
 
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