Inline Code for new Feature

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/26/2012 2:40:34 PM
Gravatar
Total Posts 10

Inline Code for new Feature

I Read your article at http://www.mojoportal.com/usinginlinecode.aspx and am at wits end.

I am new to .Net development and have a classic ASP page I would like to convert to ASPX. I think I am getting confused between ASCX and ASPX.

I did the Hello world example and got the module and control in as a new feature. Now I cant remove them either, but thats not the real problem.

Then I tried the above to add new ASPX page as per the instruction using the inline code but I get an error redirecting me back to my home page. This is so frustrating as the Mojo Tool is wonderful and I got it up and running in no time but fail to add some custome content. All I really need is a page that can retrieve data from the database from a custom table and display it. It sure as hell cant be that difficult but I fail to succeed.

Please help

Elmo

3/26/2012 2:52:42 PM
Gravatar
Total Posts 18439

Re: Inline Code for new Feature

Hi Elmo,

.ascx is a UserControl, it can be added to a mojoPortal CMS page as a custom feature.

.aspx is a Page, you cannot add a page to a page.

For more complex features you can link to supporting pages (.aspx) from your .ascx control. Inline code is ok for simple features with only a .ascx file, but generally for a more complex feature I would recommend not using inline code but instead watch the Guest Book training videos to learn the recommended way setup separate projects to build features. There are quite a few videos but they are each less than 10 minutes and it will save you time in the long run to go through them all.

It also may help to first read How mojoPortal Works.

Hope that helps,

Joe

3/26/2012 3:00:23 PM
Gravatar
Total Posts 18439

Re: Inline Code for new Feature

To delete a feature you must first delete all instances of the feature.

From the Edit This Page link you can remove a feature from a page but that does not delete the instance, it could be added back to the page from Administration > Content Manager.

There are 2 ways to delete an instance. First by clicking the settings link (assuming you used Module Title control which provides a settings link) from settings there is a delete button to delete the instance. Another way is under Administration > Content Manager, find your instance then click Publish/Delete, then click the delete button at the bottom.

Once all instances are deleted you can delete the feature itself from Administration > Advanced Tools > Feature Installation

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.