In the code given below, how do I call SandyInserts with values in createordermodel ?
CSHTML code.
@foreach (var type in types.OrderBy(t => t.Type == SureFit.ProductType.Shoe ? 1 : 2))
{
if (type.ProductCategoryId == 5)
{
- @Html.ActionLink("No Shoes", "SandyInserts", "Orders", new { }) LOOKING FOR CORRECT CODE
}
else
{
- @type.Name
}
}
ORDERSCONTROLLER: CORRECTION NEEDED HERE AS WELL
[SureFitAuth(Privilege.OrdersCreate)]
public ActionResult SandyInserts(Models.CreateOrderModel model)
{
return this.View(model);
}
What I have tried:
This is my first MVC application.
When I create order, first I have Patient Info screen, then Product Screen, then Product detail screen, Accessories screen called Inserts and finally review order screen,
In product screen I have the option to choose No product which takes me to accessories screen, skipping product detail screen.
When I call ActionResult I should pass the Order model and be able to pass Patient Info but product should be empty.
What is the correct code?