what is the div equivalent to this command?
((Panel)this.Page.Master.FindControl("Panel1")).Style.Add("display", "none");
This works fine with the panel, but I cannot find an option to do the same with the DIV that I know. somebody knows?
in advance for your help!
The div belongs to the HtmlGenericControl class of the System.Web.UI.HtmlControls namespace.
((HtmlGenericControl)this.Page.Master.FindControl("divID")).Style.Add("display", "none");
and your div control on the main page will be runat="server"
runat="server"
thank
Asif
If the div is equal runat="server", it is HttpGenericControl, not Panel. If the div is not runat="server", you cannot get the server side to it, as if you were using WebControl.
HttpGenericControl
Panel
(-), runat="server" DIV:
<div id="myDiv" runat="server">...</div>
Then you access the div just like the panel in your example.
Source: https://habr.com/ru/post/1769799/More articles:Should I use open source software in my commercial application? - open-sourcePrinting columns using awk or cut? - scriptingHow can I get PHPUnit + Selenium to work faster? - performanceDownload Rails Files and View Updates - Howto? - javascriptКак сделать заголовок столбца таблицы clickable в Wicket - javaParsing and modifying a file in turn while saving EOL characters in Java - javaAndroid - indicates that the menu is available - androidimplement unix pipes in haskell - unixTwo-way WCF service operation does not return a response instead of an exception - wcfUsing 32-bit COM add-on under MS Office 64 bit - 64bitAll Articles