c# - How to pass ViewModel property as model to partial view? -
I have LogViewModel called ViewVodel, I have 3 properties that are shown below.
public class loginwoman {public INIMERABLE & lt; Logs & gt; Logs {received; Private set; } Receive public endorsement helper endorsement; Set; } Public log filter filter {get; Set; }} The LogView model has been sent to look at the model. Now I have to pass the log filter (with data) with a partial view such as:
@ html.partial ("_logsfilter", model.filter) I tried several methods, but always get the same error:
The model item given in the dictionary 'Infrastructure' Presentation.Desk.ViewModals.LogvivodelModel's, but does this require a model in any dictionary idea?
= "text"> Because the filter property is zero, the framework model will pass from the parent view to partial, which is the logwmimodal , whereas the partial view is logfilter . P> @ html.partial ("_logfilter", model.filters? New logfilter ())
Comments
Post a Comment