Below is the static class within a solution, namespace WebApplication1
{
public static class LabelValues
{
public static string GetLabelValue(string str)
{
Return "Hello" + str; //There's a complicated logic for this
}
}
}
Now I want set Label text using below code. but its not working
<asp:Label ID="_label1" runat="server" Text="<%# LabelValues.GetLabelValue("_label1") %>" >
I want to call static class from Text attribute of label control to set values for labels.