Trouble adding an ASPX page to my 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.
7/25/2014 2:36:59 PM
Gravatar
Total Posts 11

Trouble adding an ASPX page to my feature

Hello Forum:

I have a page which has a couple of my custom features on it. This works fine.

Now I want to put a link that will go to another page in the feature. I mined this from the Blog feature. But I keep getting this message:

>>>> We're sorry but we could not find the page you are looking for. Please try the Site Map

I have tried this with a code-behind page as well as a "inline script" page.

A couple of my (possibly erroneous) ideas are listed below.

Can anyone help me with this? Thanks in advance.

Regards..

--------------------------------------------------

Guess#1 related to inheritance:

.aspx

<%@ Page Language="C#" AutoEventWireup="false" MasterPageFile="~/App_MasterPages/DialogMaster.Master" CodeBehind="CommentDialog.aspx.cs" Inherits="mojoPortal.Web.CommentDialog" %>

.aspx.cs

namespace mojoPortal.Web.GregCustomModule
{
    public partial class CommentDialog : mojoDialogBasePage
    {

Guess#2 related to page not coming from DB

I tried

CommentDialog.aspx, CommentDialog1.aspx (only has inline script), /CommentDialog.aspx, ~/CommentDialog.aspx

Guess#3 must use "inline script"

tried this thread post as CommentDialog1.aspx

https://www.mojoportal.com/Forums/Thread.aspx?pageid=5&t=7712~1

 

7/25/2014 2:47:00 PM
Gravatar
Total Posts 18444

Re: Trouble adding an ASPX page to my feature

Hi,

A couple of pointers.

Make sure your custom project post build event is copying your .aspx file somewhere below the mojoportal web project since it has to run in the context of that project. ie the file does have to exist on disk at the url you are using. Look at post build event for other projects to see how to do that

the stuff you are trying to use was really meant for popup dialog pages. Typically you need to pass the pageid and moduleid in the url to the dialog page in order for it to have the same page context as the cms page from which it is loaded

if you are not trying to make a dialog page but just a normal supporting page for your feature then you should not use the dialog class but instead use mojoBasePage and the normal master page. ie don't use a dialog page from the blog as your guide, use one of the other pages like ViewCategory.aspx. Again for this kind of page you also need to pass the pageid and mid (moduleid) in the url to the page to keep the context of the cms page that contains the entry point usercontrol of your feature.

Hope that helps,

Joe

7/25/2014 2:51:20 PM
Gravatar
Total Posts 18444

Re: Trouble adding an ASPX page to my feature

Also I don't recommend adding your code to the mojoPortal namespace

namespace mojoPortal.Web.GregCustomModule

your code should be in it own project with your own root namespace and you should avoid modifying any mojoportal code or adding your own files to the mojoportal projects.

7/25/2014 4:24:55 PM
Gravatar
Total Posts 11

Re: Trouble adding an ASPX page to my feature

Thank you...

These comments are very helpful...sometimes I have a tendency to write programs by braille...

Regards..

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