I have created a partial view "Physicians" that displays a list of all active members. How do I display the members for each state. The state selection is controled by a drop down menu and displayed in the partial view by the var selectedState.
I'm guessing there's logic feeding the list of physicians back to your partial view (or living in the view itself)? From your main view, you could pass a parameter to the partial to use as a filter for the complete set of members.
@Html.Partial("Physicians", new ViewDataDictionary({{ state = "Queensland" }}));
Which would be available in the partial as
@ViewData["state"]
Another option would be Html.Action:
@Html.Action("MyMethodName", "MyController", new { state = "Queensland" });
Which can still use the same Physicians partial UI, but would move the logic into MyMethodName on MyController, where state would be passed in as a parameter of MyMethodName. From there, you return a model to the Physicians partial, and enjoy strongly-type goodness in your UI
How do you sort a partial view
I have created a partial view "Physicians" that displays a list of all active members. How do I display the members for each state. The state selection is controled by a drop down menu and displayed in the partial view by the var selectedState.
@Html.Partial("Physicians")
@Html.Partial("Physicians")
Use Umbraco Razor Sort nodes in ascending and descending order
Thanks Pranjal
How do i do that i am new to Umbraco?
Hi Mark
I'm guessing there's logic feeding the list of physicians back to your partial view (or living in the view itself)? From your main view, you could pass a parameter to the partial to use as a filter for the complete set of members.
Which would be available in the partial as
Another option would be Html.Action:
Which can still use the same Physicians partial UI, but would move the logic into MyMethodName on MyController, where state would be passed in as a parameter of MyMethodName. From there, you return a model to the Physicians partial, and enjoy strongly-type goodness in your UI
is working on a reply...