I have the asp.net application where I am having the editable grid view with the edit,Delete,Add options. this grid having as usual Template fields. I have also a static Class that having static string variables. I want to keep these static variable's value as Header text of Template Field. So I have imported my constant class's namespace by :
<%@ Import Namespace="ConstantManagerNamespace" %>
Then I tried for same column:
1. <asp:TemplateField HeaderText=<%=ConstantManager.Name%>>
2. <asp:TemplateField HeaderText='<%=ConstantManager.Name%>'>
3. <asp:TemplateField HeaderText=<% ConstantManager.Name %>>
4. <asp:TemplateField HeaderText='<% ConstantManager.Name%>'>
all probable syntax to access my constant variable value but
I got Parser error:
Literal content ('<asp:TemplateField HeaderText=') is not allowed within a 'System.Web.UI.WebControls.DataControlFieldCollection'.
how to do this ?