Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How can I access/read from a cshtml file the data I have in a custom table in the umbraco database. I would like to display the data in a macro partial view. Umbraco 8.2.0 Thank you
why macro? need the cache? can use partial view and child actions and get data from database https://our.umbraco.com/documentation/reference/templating/mvc/child-actions
If you need cache, use outputcache or dunotcaching
It's going to be part of a plugin. The view will be inside the App_plugins folder.
sample
[ChildActionOnly] public ActionResult MyActionName() { return PartialView("~/App_Plugins/MyFolder/MyFile.cshtml"); }
To be more specific, how do i access the Umbraco database? What calls do i need to make?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to display data in a macro partial view from a custom table in the umbraco database.
How can I access/read from a cshtml file the data I have in a custom table in the umbraco database. I would like to display the data in a macro partial view. Umbraco 8.2.0 Thank you
why macro? need the cache? can use partial view and child actions and get data from database https://our.umbraco.com/documentation/reference/templating/mvc/child-actions
If you need cache, use outputcache or dunotcaching
It's going to be part of a plugin. The view will be inside the App_plugins folder.
sample
To be more specific, how do i access the Umbraco database? What calls do i need to make?
is working on a reply...