How to get control inside Datagrid ?
-
I have a issue. I want to get the value of label control inside datagrid. I show my code
<%#getCount()%>
I want to get the value of "lblTen" control when I click image button "cmdMuc1". please people help me. Thanks a lot
Assuming C#:
protected void cmdMuc1(object sender, EventArgs e)
{
Control theButton = (Control)sender;
Label theLabel = (Label)theButton.NamingContainer.FindControl("lblTen");
string theValue = theLabel.Text;
...
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Assuming C#:
protected void cmdMuc1(object sender, EventArgs e)
{
Control theButton = (Control)sender;
Label theLabel = (Label)theButton.NamingContainer.FindControl("lblTen");
string theValue = theLabel.Text;
...
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
I have a issue. I want to get the value of label control inside datagrid. I show my code
<%#getCount()%>
I want to get the value of "lblTen" control when I click image button "cmdMuc1". please people help me. Thanks a lot