locked
Using the metamodel to build asp pages RRS feed

  • Question

  • User-1300279135 posted

    Hi

    Is it possible to use the metamodel to build the actual asp pages for a solution?

     

    Cheers

    Peter

    Saturday, October 25, 2008 5:26 AM

All replies

  • User-330204900 posted

    I thought that was what it already did using the PageTemplates?

    Have a loog at my series on custom PageTemplated:

    hope this helps [:D]

    Saturday, October 25, 2008 12:16 PM
  • User-1300279135 posted

     Hi Steve

    I have been reading your articles (a great piece of work), but I was thinking:

    If I was to build a site the "old" way I would have to create a page for the edit, insert and list state for each class. Dynamic data builds these pages for me. Thus the metamodel "knows" these pages and I just wondered if anyone had tried to write these pages to disk?

    Cheers
    Peter

    Saturday, October 25, 2008 6:11 PM
  • User-330204900 posted

    Why would you want to? (This is a genuine question because I can't think of a reason doen't mean there isn't one [:D]

    Sunday, October 26, 2008 4:51 AM
  • User-1300279135 posted

     Hi

    My main reason is a sort of "better safe than sorry" argument. I realize dynamic data can in fact build a great deal of the "admin"-pages in a solution I'm developing. And I find dynamic data very flexible to work with. And it forces me to rethink and refactor my database (++good as George Orwell might have said). But, it would be a real pain, if I had to realize at some point, that my solution was just not flexible enough to cover my customers requests. Then it would be really handy if I could sort of dump my existing model to asp-pages.

    Cheers
    Peter

    Sunday, October 26, 2008 4:01 PM
  • User-330204900 posted

    Ah! well the good news is you don't need to use scaffolding at all you can create all custom page and just take advantage of the FieldTemplates in the framework by using DynamicField inplace of BoundField and DynamicControl inplace of standard controls [:D]

    see my article here:

    1. Custom Pages Part 1 - Standard Custom Page based on an existing PageTemplate and customised in the DynamicData\CustomPages folder.
    2. Custom Pages Part 2 - A completely Custom Page again in the DynamicData\CustomPages folder.
    3. Custom Pages Part 3 - Standard ASP.Net Page with Dynamic Data features added to take advantage of the FieldTemplates.
    4. Custom Pages Part 4 - A DetailsView and a GridView using Validation Groups
    5. Custom Pages Part 5 - I18N? Internationalisation Custom Page 

    Hope this helps [:D]

    Monday, October 27, 2008 4:43 AM