locked
Insert action path with a foreign key RRS feed

  • Question

  • User-1995192583 posted

    Can't figure out how to make an acton path for a child table, so i will create a new entity with a foreign key already set to the primary key from the record i'm viewing.

    There is a Children.ascx control in DynamicData\FieldTemplates, it provides a hyperlink for listing child entities from a relation.

    Say i have a globalization pattern:

    Language(LanguageID, LocaleName)

    Product(ProductID, code)

    ProductDescription(ProductDescriptionID, ProductID, LanguageID, Content)

     

    Products/List.aspx

     Edit Delete Details | code123 | View ProductDescriptions

    ...

    I want to see an aditional hyperlink here, named "add new ProductDescription"

     Edit Delete Details | code123 | View ProductDescriptions Add ProductDescription

    ...

    When i click Add ProductDesctiption, i want to some kind of Insert.aspx, but with ProductID foreign key already filled in, without an ability to change ProductID foreign key, so i could just enter other parameters, which are not inherited from the action URL.

    ProductDescriptions/InsertChild.aspx?ProductID=1

    Any good directions to accomplish this?
    Wednesday, November 5, 2008 5:09 PM

Answers

  • User1641955678 posted

    If you look at the Futures solution, it shows you how to do something like this.  Specifically, look under 'Populate Insert templates with values from filters' in default.aspx.

    thanks,
    David

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 5, 2008 7:22 PM