I have a gridview and it has HTML label element like below:
<asp:GridView ID="gridview1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="ID" ItemStyle-Width="2%">
<ItemTemplate>
<label id="test" runat="server" title="" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
I want to change title attribute of label on C#. I tried this code below bu it did not work.
Label test= (Label)GridView1.Rows[1].Cells[1].FindControl("test");
test.ToolTip= "abc";
Am I missing something or did something wrong? I know I can use <asp:Label>
but I don't want to