Sirdots
asked on
Mvc 3 : How to return a variable from a method to an action result and dispay in view.
I will like to pass a variable "totalCount" from a method to an ActionResult index view. I will like to show the variable in a text area in the view. How can I achieve this ? My code is attached.
I am using mvc 3
Question.txt
I am using mvc 3
Question.txt
ASKER
I've requested that this question be deleted for the following reason:
No good answer.
No good answer.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
You can try using ViewBag. Unfortunately, i'm not able to give you the code for it!
You can refer this article - http://rachelappel.com/when-to-use-viewbag-viewdata-or-tempdata-in-asp.net-mvc-3-applications
Hope it helps u...