pass data to generate chart RRS feed

  • Question

  • User-2060576634 posted

    hi.. whats the correct way to pass data to our chart.cshtml to generate a chart based on our data available in our requesting main page? (for example data like current userid or url data).. or can't we just write the chart code and use it in the same main page?

    Wednesday, February 11, 2015 6:28 AM


  • User-821857111 posted

    You can pass simple values via query string or UrlData. I would keep the chart page separate from the place where the chart appears. Then if you need to use it in another place, you don;t have to duplicate code.

    Here's some more on passing values between razor web pages: Transferring Data Between ASP.NET Web Pages

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 11, 2015 2:19 PM