Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. View menu from Category and Supplier

View menu from Category and Supplier

Scheduled Pinned Locked Moved ASP.NET
asp-nethelpcsharpdatabasearchitecture
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hungtk
    wrote on last edited by
    #1

    Hi everybody, I have problem with view menu in ASP.NET MVC: My Model: Category {Id, Name}, Subpplier {Id, Name}, Product {Id, Name, CategoryId, SupplyId, ...} So I want to show my menu to 2 levels: Level 1: Show Category list Level 2: Show Supplier list in each Category from Products. But i just can show Level 1 by Model = db.Categories. I can't show level 2 and how to get Supplier list from controller to view? Please help me! Thanks!

    M L 2 Replies Last reply
    0
    • H Hungtk

      Hi everybody, I have problem with view menu in ASP.NET MVC: My Model: Category {Id, Name}, Subpplier {Id, Name}, Product {Id, Name, CategoryId, SupplyId, ...} So I want to show my menu to 2 levels: Level 1: Show Category list Level 2: Show Supplier list in each Category from Products. But i just can show Level 1 by Model = db.Categories. I can't show level 2 and how to get Supplier list from controller to view? Please help me! Thanks!

      M Offline
      M Offline
      mhemant
      wrote on last edited by
      #2

      in your category model do you have navigation property to get list of suppliers? If yes then For Level 2- you can do same thing which you did for level 1 Thanks

      1 Reply Last reply
      0
      • H Hungtk

        Hi everybody, I have problem with view menu in ASP.NET MVC: My Model: Category {Id, Name}, Subpplier {Id, Name}, Product {Id, Name, CategoryId, SupplyId, ...} So I want to show my menu to 2 levels: Level 1: Show Category list Level 2: Show Supplier list in each Category from Products. But i just can show Level 1 by Model = db.Categories. I can't show level 2 and how to get Supplier list from controller to view? Please help me! Thanks!

        L Offline
        L Offline
        lokerjobindo
        wrote on last edited by
        #3

        so true in your category model do you have navigation property to get list of suppliers? If yes then For Level 2- you can do same thing which you did for level 1, and then deploy for your code in mvc and database, or module in css menu for multiple menu, thanks sign Lowongan Kerja

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups