如何将Linkbutton的文本转换为其Click事件中的字符串类型

kum*_*tyr 0 .net c# asp.net gridview linkbutton

我在gridview中发布问题...发布时,问题将从按钮单击事件中的gridview文本转换为gridview中的linkbutton控件

我已经得到了我想要的东西但是

我无法在字符串类型中获取LinkBut​​ton文本,以便在其子页面上再次发布相同的问题,并在同一页面下单独查看它的回复

做ASP.net C#2.0

protected void QuestionLinkButton_Click(object sender, EventArgs e)
    {
string LBQ = linkbutton.text; 
}
Run Code Online (Sandbox Code Playgroud)

Dam*_*ith 8

protected void QuestionLinkButton_Click(object sender, EventArgs e)
{
    LinkButton btn = sender as LinkButton;
    string LBQ = btn.Text; 
}
Run Code Online (Sandbox Code Playgroud)