This is a migrated thread and some comments may be shown as answers.

Dynamically build views from the database?

3 Answers 841 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Neil
Top achievements
Rank 1
Neil asked on 25 Oct 2016, 03:14 PM

I'm wondering if anyone has tried and would like to share how to dynamically store the telerik html code in a database and render it onto a MVC view dynamically. I have a project I'm currently working on and have been unsuccessful so far.

 

Thanks,

Neil

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 27 Oct 2016, 11:11 AM
Hello Neil,

Can you elaborate a bit on the exact result you are targeting? Do you want to store the widgets configuration into a data table or do you want to store the output html once the widgets are rendered in the browser? Please note, that if the latter is true such an action will only render the visual result of the widget, but it will not function as such.

Despite from this fact, you can find useful information on the matter in the following StackOverflow thread:
http://stackoverflow.com/questions/300424/how-to-display-html-stored-in-a-database-from-an-asp-net-mvc-view

Regards,
Vessy
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
0
Neil
Top achievements
Rank 1
answered on 27 Oct 2016, 02:35 PM
I'm wondering if it's possible to dynamically build razor views that contain the Telerik MVC tool set.So I guess that would be storing the @Html.Kendo().Textbox... in a  database, render it to the screen at run time and have it execute with all the bells and whistles that normally accompany the controls.
0
Vessy
Telerik team
answered on 31 Oct 2016, 12:26 PM
Hi Neil,

There are several possible ways to build a Razor view dynamically, I would advice that you examine the resources linked in the following SO thread where this question is discussed in details:
http://stackoverflow.com/questions/9703119/dynamically-produce-razor-views-at-runtime

You can also find useful information on the matter in the following blog post:
http://www.binaryintellect.net/articles/e544d1d3-e47e-4ced-bd4d-8c1eaefbdc31.aspx

Regards,
Vessy
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Tags
General Discussions
Asked by
Neil
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Neil
Top achievements
Rank 1
Share this question
or