Vinz' Blog (ProudMonkey)

"Code, Beer and Music ~ my way of being a programmer"
posts - 134, comments - 549, trackbacks - 0

My Links

News

Tag Cloud

Archives

Post Categories

Image Galleries

I'm a...

I'm at...

Hide WebPart Header and Border on BrowseDisplayMode

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!

 

Technorati Tags: ,,

Print | posted on Tuesday, August 11, 2009 8:31 PM | Filed Under [ ASP.NET WebParts Tips&Tricks ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: