locked
How to load data with a click in a view RRS feed

  • Question

  • User1791669525 posted

    Hi guys,

    as a beginner in ASP.NET MVC I have a Problem to solve.
    My view Shows some data that could be edited. So far so good.

    I have added a tree, that I Show if a user wants to copy other detail-data to his dataset.
    This tree is filled when calling the view, so I Always have to read the data and build the tree, when Opening the view.
    Often These data are not needed because the user don't want to copy existing data.
    My idea is to load the data, when the user clicks on the copy-button.

    How do I solve this, without reloading the view.
    At the Moment I hav absolutely no idea how to solve this.
    Is it the same way as triggering a controler Action?

    Thanks 

    Wednesday, January 23, 2019 8:47 AM

All replies

  • User-2054057000 posted

    Telefisch

    My idea is to load the data, when the user clicks on the copy-button.

    You can use jQuery AJAX method to get your treeview to filled with data without reloading the page. I have found a nice tutorial that will help you get started. 

    ASP.NET MVC Application - Using JQuery, AJAX

    Don't worry that right now you don't have any Idea. Once you read and complete this tutorial you will be in a much better place to solve your problem.

    Thanks & Regards

    Wednesday, January 23, 2019 3:36 PM