In order to hide those, we can set the BorderStyle and the PartChromeType attribute of the WebZone to none after we set the display mode of WebPartManager to browse just like below:
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { WebPartManager1.DisplayMode = WebPartManager.BrowseDisplayMode; foreach (WebPartZone wz in WebPartManager1.Zones) { wz.BorderStyle = BorderStyle.None; wz.PartChromeType = PartChromeType.None; } } } |
That’s simple!