I'm just starting with ASP.Net MVC 2 and doing something wrong. I have a controller who creates some objects and uses Vodatata to send them in a scene, in the scene I display data etc. ... and then want to submit the same controller to the same data (with other user input) Is there any easy way to do this?
If needed, I will provide a more detailed description of the problem.
Thanks and Good Day :)
Edit: I was afraid that I am not using them correctly, but apparently they There are no solutions. I can not find the data to see my problem (I'm already using a visual model for that), but the data is returning back to the controller I use complex objects, so Sending a farm with hidden fields is actually a It will not be a good solution because it will require me to sort my items, which is very difficult for a job which should be simple. I will keep an eye on the sessions for now.
Edit 2: OK, I solved the problem using sessions, it was not easy :)
Consider these solutions to keep the state between requests:
- Add data to the session, cache, or Cookies This option will depend on what data this data is, how much data is between the users and how complex it is.
- Type
Html.Hidden ("foo", myData) for those hidden inputs;
If you choose to write on hidden inputs, think about it. Although this is a non-optimal solution.
I like the session completely. I have no tampering, and you can catch complex objects. Clearly the loopholes in session are concurrently with scaling performance, timelines and multiple sessions in the future. Some of these problems can be easily reduced, though.
Comments
Post a Comment