ASPX templates
Version 3.x > ASPX templates > Control properties View modes: 
User avatar
Guest
scott - 7/30/2008 11:22:23 PM
   
Control properties
I have a user control which has properties I want to be able to set from within the CMS. I started created a web part as it had all the custom properties I would expect but then I got a 'parent' error when I tried to use it. Searching the forums came up with a post that said I can't use webparts when using an ASPX site. Your documentation is sorely lacking in this area. Can you please point me to the documentation that tells me where I can create a custom user control with more than 1 property that can be set by a content editor in the CMSdesk.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/31/2008 7:12:18 AM
   
RE:Control properties
Hi Scott,

When using ASPX templates, you have no Design tab and you cannot configure the web parts (user controls) via CMS Desk. the configuration of the user control is possible only in the code file of the page, where the control is placed.

You can develop your user control as described here - http://www.kentico.com/docs/devguide/developing_web_parts.htm.

If you want to add your custom properties, you need to define them as "Public properties". You can take a inspiration from our default user controls placed in CMSWebparts folder.

Best Regards,
Juraj Ondrus


User avatar
Member
Member
scott - 7/31/2008 7:25:00 AM
   
RE:Control properties
I have created a web part as per the section you have linked to. I have added it to my page as per standard .net programming, I have exposed public properties as per the CMSWebParts folder. My control is displayed on my page and in the Page tab of the CMS. Where in the CMS can I set the value of these properties? I can't see them anywhere.

After spending a lot of time trying to make something simple with the ASPX site I have to wonder what the point is? I can't replicate the functionality of the portal site as it has less functional ability. Nowhere in your documentation does it explain this. I thought I would have more power using ASPX, not less.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/31/2008 7:38:28 AM
   
RE:Control properties
Hi again,
As I mentioned before, when using ASPX templates, there is no Design tab in CMS Desk, so you cannot configure the control from here. You need to configure it in the code of the page where it is added. For example on the default home page is editable region control and its code: <cms:CMSEditableRegion runat="server" ID="MainContentText" RegionTitle="Main text" DialogHeight="320" RegionType="HtmlEditor" />

So in this you need to write your properties and set them appropriate value.

ASPX templates are recommended to more experienced ASP.Net users. With this approach they have the full control of the code they develop. When using portal engine, you do not have the direct access to the code since it is stored in DB. Here you can see the comparasion - http://www.kentico.com/docs/devguide/site_development_overview.htm

Best Regards,
Juraj Ondrus

User avatar
Member
Member
scott - 7/31/2008 5:01:49 PM
   
RE:Control properties
Well I'm an experienced .Net user and I'm finding your ASPX site pointless. I can already create a control and add it to any page I want with just Visual Studio. I want to create a control and set the properties of it inside Kentico. I can do this if I use the portal site but not if I use your ASPX site. I ask again, what is the point of the ASPX site? You cripple the functionality of the portal site. I've read through all of your documentation many times trying to find out what I'm missing and I can assure you it isn't very clear.

Let me give you an example. I create a custom control which I want to set a heading and a sub-heading on as it contains some special functionality. I create a webpart and and add some properties to it. If I have a portal site, I can add the webpart to a webpartzone and then set the properties in Kentico and it will appear on the page. If I add the webpart to an ASPX page and view that page in Kentico I have no access to the properties. Am I missing something or is the ASPX site a waste of time?

It seems as if I create an ASPX site I lose half of the functionality of Kentico, if I create a portal site, I lose most of the functionality of Visual Studio. I'm asking for your help here as I'm evaluating the purchase of Kentico and I'm afraid your documentation isn't helping.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/4/2008 1:45:36 AM
   
RE:Control properties
Hi,
ASPX templates and Portal engine are two different approaches.
Portal Engine is recommended for less experienced user that do not know how to use Visual Studio, are not programmers, etc. In these templates you are using the controls and all other things from our engine. Of course, you can combine it is some way with ASPX, but the web parts are inheriting from different class. In Portal engine, lets say, you cannot do anything you want - there are several restrictions.

In ASPX templates, you can edit the content of the web as in Portal Engine, you can use the features of Visual Studio and develop the code as you want with functionality you want, you can use any user or server controls which you will develop.

If the Portal templates are enough for you, you can use them. You can modify the default user controls or develop your custom.
It is up to you what is more comfortable for you.

Best Regards,
Juraj Ondrus