Click here to Skip to main content
16,017,069 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have a value in one controller i want to use this value in different view how to do that
Posted

1 solution

To return a different view, you can specify the name of the view you want to return and model as follows:
return View("ViewName", yourModel);


To get the absolute path of the view, use:
return View("~/Views/FolderName/ViewName.aspx");
 
Share this answer
 
Comments
Member 11970398 9-Dec-15 23:55pm    
i am not talking about that .i have a value in one controler how can i show that in different view associated with different controler
Saad Saadi 10-Dec-15 0:10am    
you want to pass data from one controller to another and show that data in view?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900