Here's my problem
I have a datagrid with a linkbutton column. when i click the link in any row the link button text should display it in the label control in the webpage
<asp: Datagrid>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Linkbutton id="linkuser" runat="server" text='<%#Databinder.Eval(C
ontainer.D
ataItem,"F
ullName")%
>' onclick="showtext"/>
</itemtemplate></asp:Templ
ateColumn>
</asp:Data
grid>
Protected void showtext(object o event args e)
{
Linkbutton1=new LinkButton();
Linkbutton1=(Linkbutton)dg
.FindContr
ol("linkus
e");
//I don't know how to take that particular column data of a particular row. Please help me in this. hope you've understood what iam trying to do.
Label1.text=Linkbutton1.te
xt;
}
The link button column is like this
Elizabeth
Mian
Laura
Mike
if i click Elizabeth the label should show the text Elizabeth in the webpage
if i click Mian , then label .text should be Mian
Please help me thanks
Start Free Trial