How to create a webpart with chrome type

How to create a webpart with chrome type

  • Comments 1

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

 

Comments
Leave a Comment
  • Please add 8 and 7 and type the answer here:
  • Post