Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Create ASPX Page v9

  1. #1
    brinegart is offline Junior Member
    Join Date
    Aug 2010
    Posts
    2

    Default Create ASPX Page v9

    How can I create another page, NOT topic, like default.aspx so that it can be linked to from around the site. I tried a simple copy and edit but it falls out once a link to that page is clicked and logs:

    Exception of type 'System.Web.HttpUnhandledException' was thrown.

    ...And yes I've copied the codebehind file, which I am assuming is what needs modified (but cannot find guidance for).

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    If you click (+) from the exception, you should see the stack trace, post that here and will take a look.

    Also, just a hint, say for example if you have a page named YourCustompage.aspx, you need this line:

    Code:
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="YourCustomPage.aspx.cs" Inherits="AspDotNetStorefront.YourCustomPage" MasterPageFile="~/App_Templates/Skin_1/template.master" %>
    In the code behind file (.aspx.cs), make sure the Partial Class Inherits SkinBase instead of System.Web.UI.Page.

    e.g.
    Code:
    namespace AspDotNetStorefront
    {
        public partial class YourCustomPage : SkinBase
        {
    ....
    ....
        }
    }

  3. #3
    brinegart is offline Junior Member
    Join Date
    Aug 2010
    Posts
    2

    Default

    Thank you. I needed it in VB, but was able to cross reference what you gave me.

    For reference:

    NewPage.aspx
    Code:
    <%@ Page Language="vb" Inherits="AspDotNetStorefront.NEWPAGE" CodeFile="NEWPAGE.aspx.vb" MasterPageFile="~/App_Templates/Skin_2/template.master" %>
    NewPage.aspx.vb
    Code:
    Namespace AspDotNetStorefront
        Partial Public Class NEWPAGE
            Inherits SkinBase
        End Class
    End Namespace