Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Guys,Can we assign a value to a tempdata in an event like click in javascript.
If yes ,How?
Posted
Comments
Sergey Alexandrovich Kryukov 2-Sep-15 4:11am    
Not clear. What is that "tempdata"? What do you want to achieve?
—SA
[no name] 2-Sep-15 5:01am    
In MVC:
TempData["CurrentTab"] = id;

In Javascript:
alert('@TempData["CurrentTab"]');
ravithejag 2-Sep-15 5:43am    
I want to know can i assign values in tempdata in javascript method r any other variable in javascript file in mvc so that i can get that value in controller action method

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