0

Heads up. I'm a beginner to MVC4 and C#. I was put on a project to get familiar with MVC4 (not for school) but I'm still confused about certain things. On one page, I have a link that upon user click outputs the results of a test. On that one page, there are several links to individual tests that output results.

My question is how do I take those individual links and create one link to output all the test results. so that the tests are run with one button instead of several.

I imagine I have to use the append function. Should I just append all test functions in a for loop in a controller? Is that all I have to do? Or is there more to do like creating a separate view or model? I'm really confused on how everything is integrated.

If someone could provide me with a very basic example with a test of 2+2 =4 and 3+5=8 and create a view that contains both test results 4 and 8, that would be great. I'm dealing with a more complex test but any example of how everything is tied together and works would be great.

Also, would this work better in client or server side?

Thank you.

tereško
  • 58,060
  • 25
  • 98
  • 150
Kala J
  • 2,040
  • 4
  • 45
  • 85

1 Answers1

0

So there is one link anchored "Results" and that should list all the test results. Thats what i understood.

From what i understood, in your controller construct a view model holding all the test results.

For client side scripting you need to manipulate DOM by hand or use some libraries like knockoutjs. If the volume of data is in the limits, client side scripting saves you performance.

Arun Aravind
  • 1,238
  • 10
  • 9