Adicionar classe CSS a uma div no código por trás
Eu tenho uma div e estou tentando adicionar uma classe CSS a ela no código, mas recebo o seguinte erro ao tentar
Property or indexer 'System.Web.UI.HtmlControls.HtmlControl.Style' cannot be assigned to -- it is read only
Estou usando o seguinte código:
protected void BTNEvent_Click(object sender, ImageClickEventArgs e)
{
BtnventCss.Style= "hom_but_a";
}
alguém pode me ajudar por favor?