This is a migrated thread and some comments may be shown as answers.

[Solved] Can you use "LoadContentFrom" to load a partial view into the content of a tabstrip?

0 Answers 96 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mark
Top achievements
Rank 1
Mark asked on 25 Oct 2010, 04:35 PM
I was trying to load the contents of a tabstrip using the .Content method - specifying a partial view something like ...

        .Items(items =>
        {
            items.Add()
                .Text("tab1")
                .Action("Action", "Controller", new { Id = Model.Id })
                .Content(() =>
                {%>
<div id="div1">
    <% Html.RenderPartial("PartialViewName", Model); %>
</div>
<%});

the above populates the 'content' of the tabstrip with the partial view as expected, however this made the tabstrip creation code a bit messy so I thought I'd try using LoadContentFrom method calling an action which would return the same partial view.

.Items(items =>
{
    items.Add()
        .Text("All Studies")
        .LoadContentFrom("Study", "DashBoard", new { studyId = Model.StudyId });


However I just get the partial view returned - I was expecting the 'LoadContentFrom' method to do something similar to the .Content method - am I misunderstanding something here?

Thanks
Mark
Tags
TabStrip
Asked by
Mark
Top achievements
Rank 1
Share this question
or