Welcome to MSDN Blogs Sign in | Join | Help

How to create a webpart with chrome type

If we want to customize the layout a webpart – say don’t want the border and title, or only need border or only need title etc, we will do it through UI by setting the Chrome type of the corresponding webpart.

Here I just want to know how we can set this one by default whenever we create custom webpart.

clip_image002

Here I just want to know how we can set this one by default whenever we creating custom webpart. We can accomplish this by setting the ChromeType property of the webpart in the CreateChildControls() method. Here is the sample code snippet.

clip_image004

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.partchrometype.aspx

 

Published Saturday, November 15, 2008 4:56 AM by sowmyancs

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# infoblog » How to create a webpart with chrome type

Saturday, November 15, 2008 12:04 AM by infoblog » How to create a webpart with chrome type

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker