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 10 of 10

Thread: Creating a NEW PAGE (a real one)

  1. #1
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default Creating a NEW PAGE (a real one)

    I want to create a new page - not a new content topic - but a new page that will take on the look of the site. I need to write my own code in the CodeFile.

    Does anyone know how to do this?

    Thanks in advance!

  2. #2
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default Anyone

    Does anyone know how to do this?

  3. #3
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    If you mean a new aspx page then create the new files.

    (.aspx and .aspx.cs)

    in the .aspx.cs file
    C#/VB.NET Code:
    using AspDotNetStorefrontCore;
    namespace 
    AspDotNetStorefront
    {
        public 
    partial class filenamehere SkinBase
       
    {
       }

    and head of your .aspx page
    C#/VB.NET Code:
    <%@ Page language="c#" Inherits="AspDotNetStorefront.filenamehere" CodeFile="filenamehere.aspx.cs" %>
    <%@ 
    Register TagPrefix="aspdnsf" TagName="Topic" src="TopicControl.ascx" %> 
    Hope that helps
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  4. #4
    psharma is offline Junior Member
    Join Date
    Jun 2010
    Posts
    18

    Default ASPX page

    I'm using version 9.1. It seems all the pages are implemented through user controls. With the above solution, I'm getting error. Does ot work for you?

  5. #5
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    I have not used ver 9+, my method is for versions 8 and below.
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  6. #6
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by e-tradecounter View Post
    If you mean a new aspx page then create the new files.

    (.aspx and .aspx.cs)

    in the .aspx.cs file
    C#/VB.NET Code:
    using AspDotNetStorefrontCore;
    namespace 
    AspDotNetStorefront
    {
        public 
    partial class filenamehere SkinBase
       
    {
       }

    and head of your .aspx page
    C#/VB.NET Code:
    <%@ Page language="c#" Inherits="AspDotNetStorefront.filenamehere" CodeFile="filenamehere.aspx.cs" %>
    <%@ 
    Register TagPrefix="aspdnsf" TagName="Topic" src="TopicControl.ascx" %> 
    Hope that helps
    This actually worked great for me!

  7. #7
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Here's the V9 version:

    The .aspx page (mypage.aspx):
    Code:
    <%@ Page Language="c#" Inherits="AspDotNetStorefront.mypage" CodeFile="mypage.aspx.cs" MasterPageFile="~/App_Templates/skin_1/template.master" %>
    
    <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="PageContent">
    	Some content here
    </asp:Content>
    The supporting .aspx.cs code (mypage.aspx.cs) which is the same:

    Code:
    using AspDotNetStorefrontCore;
    
    namespace AspDotNetStorefront
    {
        public partial class mypage : SkinBase
        {
        }
    }

  8. #8
    psharma is offline Junior Member
    Join Date
    Jun 2010
    Posts
    18

    Default Creating a NEW PAGE (a real one)

    Its still not working. I have a hyperlink on my homepage linking to my new created page. But when I click that link it cannot find that page. Do we need to build or compile? Its on my developing machine.

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

    Default

    If the modifications are within the code-behind pages, you don't need to recompile it unless it's in the Aspdnsf projects. Tell us how were you calling the *new page* in the hom page. Were you using an <a href> tag or response.redirect?

  10. #10
    psharma is offline Junior Member
    Join Date
    Jun 2010
    Posts
    18

    Default Create a new page

    Yes, First I created a new aspx page in my root directory. Then I created an <a href> link to that page. When I click on link, page is redirected to some error handling page. It appears to me that all aspx pages are implemented through ascx controls. Do I have to create an ascx file and register it in my page?