saad Benmakhlouf

saad Benmakhlouf

  • NA
  • 52
  • 2.9k

Get Pk From View

Oct 30 2020 6:16 AM
Hi,
I use .Net Core 3.1
 
From Controller "Order" View "Index" I want to create a button
this button redirect me to an other controller "Invoice" View "Create"  
  1.   <a href="/Invoices/Create/@item.Pk" class="Button">Create New Invoice</a>
 
Problem :
I want to get the Pk when i call the method Create
  1. public IActionResult Create(int someId)  
  2. {  
  3. //here i want to get the Pk  
  4. return View();  
  5. }  
  6.    

Answers (5)