Wikipedia:Reference desk/Archives/Computing/2020 March 20
Computing desk | ||
---|---|---|
< March 19 | << Feb | March | Apr >> | March 21 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
March 20
editASP.NET Core question
editIs there a way in ASP.NET core to directly include one .cshtml
file in another? So that the view file would be rendered all statically, with one part of the file coming from another file? JIP | Talk 21:54, 20 March 2020 (UTC)
- Replying to myself. Apparently it can be done with
@Html.Partial()
or@Html.RenderPartial()
: https://stackoverflow.com/questions/25220665/how-to-insert-file1-cshtml-into-a-section-in-main-view, but I haven't tried it out yet. JIP | Talk 11:25, 21 March 2020 (UTC)