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
  1. Home
  2. Web Development
  3. MVC control libraries

MVC control libraries

Scheduled Pinned Locked Moved Web Development
htmlasp-netarchitecturequestion
6 Posts 2 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.
  • realJSOPR Offline
    realJSOPR Offline
    realJSOP
    wrote on last edited by
    #1

    Is it possible to write libraries that contain controls/markup for use by multiple MVC5 apps?

    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
    -----
    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
    -----
    When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

    Richard DeemingR 1 Reply Last reply
    0
    • realJSOPR realJSOP

      Is it possible to write libraries that contain controls/markup for use by multiple MVC5 apps?

      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
      -----
      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
      -----
      When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Unfortunately, it seems only ASP.NET Core / .NET 5 supports this out of the box: Reusable Razor UI in class libraries with ASP.NET Core | Microsoft Docs[^] But you might be able to use RazorGenerator: GitHub - RazorGenerator/RazorGenerator: A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.[^] Reusable ASP.NET MVC components in dll like ASP.NET WebControls - Stack Overflow[^]


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      realJSOPR 3 Replies Last reply
      0
      • Richard DeemingR Richard Deeming

        Unfortunately, it seems only ASP.NET Core / .NET 5 supports this out of the box: Reusable Razor UI in class libraries with ASP.NET Core | Microsoft Docs[^] But you might be able to use RazorGenerator: GitHub - RazorGenerator/RazorGenerator: A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.[^] Reusable ASP.NET MVC components in dll like ASP.NET WebControls - Stack Overflow[^]


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        We're not using Core

        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
        -----
        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
        -----
        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

        Richard DeemingR 1 Reply Last reply
        0
        • realJSOPR realJSOP

          We're not using Core

          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
          -----
          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
          -----
          When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

          Richard DeemingR Offline
          Richard DeemingR Offline
          Richard Deeming
          wrote on last edited by
          #4

          I know - that's why I suggested RazorGenerator.


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

          1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            Unfortunately, it seems only ASP.NET Core / .NET 5 supports this out of the box: Reusable Razor UI in class libraries with ASP.NET Core | Microsoft Docs[^] But you might be able to use RazorGenerator: GitHub - RazorGenerator/RazorGenerator: A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.[^] Reusable ASP.NET MVC components in dll like ASP.NET WebControls - Stack Overflow[^]


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote on last edited by
            #5

            Well, I installed it and finally figured out how to get it working (the docs aren't exactly forthcoming - or complete). In any case, it looks like this is my only choice if I want to try doing what I need, so I 5'd you., Thanks for the info. :)

            ".45 ACP - because shooting twice is just silly" - JSOP, 2010
            -----
            You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
            -----
            When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

            1 Reply Last reply
            0
            • Richard DeemingR Richard Deeming

              Unfortunately, it seems only ASP.NET Core / .NET 5 supports this out of the box: Reusable Razor UI in class libraries with ASP.NET Core | Microsoft Docs[^] But you might be able to use RazorGenerator: GitHub - RazorGenerator/RazorGenerator: A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.[^] Reusable ASP.NET MVC components in dll like ASP.NET WebControls - Stack Overflow[^]


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              realJSOPR Offline
              realJSOPR Offline
              realJSOP
              wrote on last edited by
              #6

              I am dismayed to find no tangible examples of its usage - nothing but casual mentions of what people did to make it work.

              ".45 ACP - because shooting twice is just silly" - JSOP, 2010
              -----
              You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
              -----
              When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

              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