How to select a div element in the code-behind page?

前端 未结 6 1317
时光说笑
时光说笑 2020-12-29 09:11

I have a div element:

I want to control this element from the code-behind page an

6条回答
  •  梦毁少年i
    2020-12-29 09:46

    you'll need to cast it to an HtmlControl in order to access the Style property.

    HtmlControl control = (HtmlControl)Page.FindControl("portlet_tab1"); control.Style.Add("display","none");

提交回复
热议问题