Guest User

Guest User

  • Tech Writer
  • 43
  • 6.1k

Send Value in .cs file.

Apr 19 2021 4:20 AM
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)