8
Answers

Send Value in .cs file.

Guest User

Guest User

3y
654
1
How to send value (any value) view to controller for eg please see this code
  1. <li id="@category.CategoryId"><a href="/blog/category">@category.Title</a></li> }  
  2. </ul>  
  3. <script>  
  4. $('li').on('click'function () {  
  5. var id = $(this).attr('id');  
  6. alert(id);  
  7. @*@TempData["CID"] = id;*@  
  8. });  
  9. </script>  
i have click here categories how to send id .cs file (redirect other page) .
Answers (8)