Custom Page Tip

Last post 05-09-2008 4:10 PM by tlanier. 7 replies.

Sort Posts:

  • Custom Page Tip

    05-09-2008, 12:57 PM
    • Loading...
    • tlanier
    • Joined on 04-29-2008, 9:20 AM
    • Posts 67

    If you change a table's display name with the TableDisplay attribute, the name of the folder used for a custom page is also changed.

     

  • Re: Custom Page Tip

    05-09-2008, 2:11 PM
    • Loading...
    • sjnaughton
    • Joined on 04-29-2008, 1:11 PM
    • Newton-le-Willows, UK
    • Posts 441

    Are you saying that this is the way it is or are you asking if this is the way it is?

    Steve

    Seeking the elegant solution.
    [Oh! If olny I colud tpye!Confused]
    c# Bits blog
  • Re: Custom Page Tip

    05-09-2008, 2:30 PM
    • Loading...
    • tlanier
    • Joined on 04-29-2008, 9:20 AM
    • Posts 67

    That's the way it works today. I'm not sure whether it is suppose to be that way.

     

  • Re: Custom Page Tip

    05-09-2008, 3:18 PM
    • Loading...
    • davidebb
    • Joined on 06-11-2002, 8:31 AM
    • Redmond, WA
    • Posts 859
    • AspNetTeam

    No, it's not supposed to, and as far as I can see it isn't.  e.g. I have:

    [DisplayName("My product table")]
    public partial class Product {}
    
      

    And my custom pages still go into DynamicData/CustomPages/Products.  Can you give more details about the exact scenario you are trying?

    thanks,
    David

  • Re: Custom Page Tip

    05-09-2008, 3:42 PM
    • Loading...
    • tlanier
    • Joined on 04-29-2008, 9:20 AM
    • Posts 67

    The table name is: "RemoteCycleRows"

    To get the custom page to work, I had to rename the folder from "RemoteCycleRows" to  "DynamicData\CustomPages\Remote Cycles"

    [MetadataType(typeof(RemoteCycleRow_Metadata))]
    public partial class RemoteCycleRow {
    }
    
    [TableName("Remote Cycles")]
    [DisplayColumn("BoxRow")]
    public class RemoteCycleRow_Metadata
    {
     stuff here   
    }
    Let me know if you need anything else.
    Tommy
     
  • Re: Custom Page Tip

    05-09-2008, 3:47 PM
    • Loading...
    • tlanier
    • Joined on 04-29-2008, 9:20 AM
    • Posts 67

    David, I see that my original post referred to the TableName attribute as TableDisplay attribute. That probably caused some confusion.

    Tommy

     

  • Re: Custom Page Tip

    05-09-2008, 3:51 PM
    • Loading...
    • davidebb
    • Joined on 06-11-2002, 8:31 AM
    • Redmond, WA
    • Posts 859
    • AspNetTeam

    Ah yes, then that is by design: TableName changes the basic table name for DynamicData and affects the folder name (and the URL's).  Then their is DisplayName which affects the 'friendly name' for the table.

    David

  • Re: Custom Page Tip

    05-09-2008, 4:10 PM
    • Loading...
    • tlanier
    • Joined on 04-29-2008, 9:20 AM
    • Posts 67

    Perfect, I should have been using DisplayName not TableName all along.

    It works exactly like you said.

    Tommy

     

Page 1 of 1 (8 items)