Dynamically build views from the database?

4 posts, 0 answers
  1. Neil
    Neil avatar
    2 posts
    Member since:
    Aug 2016

    Posted 25 Oct Link to this post

    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

  2. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 27 Oct Link to this post

    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.
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Neil
    Neil avatar
    2 posts
    Member since:
    Aug 2016

    Posted 27 Oct in reply to Vessy Link to this post

    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.
  5. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 31 Oct Link to this post

    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.
Back to Top
UI for ASP.NET MVC is VS 2017 Ready