Using Webparts on ASPX templates

Bea Y asked on March 5, 2015 07:50

Hi! :)

I'm trying to create a custom Blog with an ASPX template, instead of creating it within the CMS but I cannot find any documentation regarding using webparts within ASPX templates (as opposed to within the CMS).


(I may have just been using the wrong keywords to search for this topic. If so, sorry and thanks for directing me towards the correct link.)

Recent Answers

Reza Zareian Fard answered on March 5, 2015 08:56

Hi Bea Y, Although I do not recommend this approach and I always suggest to use portal engine, but check the link below:

0 votesVote for this answer Mark as a Correct answer

Bea Y answered on March 5, 2015 09:01 (last edited on March 5, 2015 09:02)

Hi Reza Zareian Fard, :)

We actually prefer to use the CMS portal too, however we're turning over maintenance to our client and we wanted to avoid the possibility of the client accidentally applying changes to the website so we decided to go with applying the web part directly to the ASPX template.


0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 5, 2015 13:39

You cannot use webparts in the aspx template development model. Webparts are made specifically for portal templates. What you'd use in aspx would be the actual user controls the webparts are using.

If you're concerned about your client making changes and breaking THEIR site AFTER you've done the work, then so be it. In my opinion, they need some training then and a phone number to call WHEN they break the site. Don't develop the website in such a fashion as to make it so the client can't perform updates, all you'll end up doing is making the client mad and going to another developer because you didn't implement it in such a fashion that they can use the CMS's functionality.

Using ASPX, your limiting the clients functionality within Kentico that they paid for. It would be like you purchasing a car with all the features but the dealer decides he is going to cut back some of the features because, "You have 5 speeding tickets and 3 accidents, so we're going to disable the radio, navigation, govern the speed of the car to 55 MPH and take away your power windows and locks".

(shameless plug for my blog) I wrote a blog post a few weeks back about Kentico best practices and development models was the first thing I talk about. Check it out. Educate yourself before you go down one road over the other. Even the most non-technical client can be taught, think of it as an opportunity to educate the client and earn some more income on a project vs. being "Big Brother"!

1 votesVote for this answer Mark as a Correct answer

Charles Matvchuk answered on March 6, 2015 16:14

I totally agree with Brenden. If you must limit some of the page and the functionality, which I totally don't subscribe to, you can mix aspx templates with the portal functionality and have place zones on the page. See Documentation

In my experience, its messy, its cumbersome and to be quite frank I cannot come up with a valid reason to use it. Actually I now always use Portal Engine with Custom Web Parts. You could create a custom web part and inherit use the components and custom layout.

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 6, 2015 18:15

What's that "old" saying Charles, "once you go Portal you never go back"? or something to that effect... :)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.