ASP.Net Webparts: How to Hide a Web Part?

On one of the pages of my ASP.Net 3.5 site, I need to hide a specific website, since it is not applicable to this page (note: web pages are defined on the main page). I basically have three web pages in the zonetemplate contained in the zone of the wpzGadgets web part. The web page containing the Google Map control must be hidden.

How to hide web part in code ?

I tried the following:

wpzGadgets.WebParts["googleMap"].Visible = false;

But it showed me the following error:

The Visible property cannot be set in the gwpgoogleMap web part. It can only be installed on a separate web part.

Is it even possible to hide individual web pages?

Thanks in advance.

+3
1

, ... , , webpart true!

+4

Source: https://habr.com/ru/post/1708696/


All Articles