remove css class in code behind
You can replace "required" with an empty string:
lblName.CssClass = lblName.CssClass.Replace("required", "");
This worked for me
lblName.CssClass = "regular";
Just a slightly more generic way of doing the same - should rule out potential errors where a css class might occur elsewhere in the CssClass property.
public void RemoveCssClass(WebControl controlInstance, String css)
{
controlInstance.CssClass = String.Join(" ", controlInstance.CssClass.Split(' ').Where(x => x != css).ToArray());
}