c# - Passing additional data value to strongly typed partial views in ASP.NET MVC -


I have the OrderForm domain class, which contains sub-categories of assets, such as some: < / P>

  Interface IOrderForm {int OrderId {get; } ICustomerDetails CustomerDetails {Receives; Set; } IDeliveryDetails DeliveryDetails {Received; Set; } IPADS Details Payment Details {Receive; Set; } IOrderDetails Order Details {Received; Set; }}  

My "description" view is strongly received from iOrderForm . I have a vigorous type partial to present each section:

   

This work is fine till this point, but I am trying to add some good AJAX bits to update some parts of the order form, and I realize It is happened that every part of my thoughts also needs access to IOrderForm.OrderId .

Is the easiest way to access this value partly?

You

  this.ViewContext.RouteData.GetRequiredString ["OrderId "]  

Or you can get value from your root by adding it to your viewData

TempData is also a very easy way ...


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -