views:

48

answers:

0

I have an action that returns a partial view. The views is a table and each row if another partial view. Each row contains a form for submitting settings for a piece of hardware.

After submitting the form I would like to make sure the forms so the correct state of the hardware so I do a get for the action and replace the HTML with the contents of the get.

When I do this the table is rendered but none of the row contents are rendered. They are in the HTML if I use firebug, but they are not being displayed in the browser.

Any help would be useful.

Edit

Everything loads just fine on the initial page load, but that is being done server side. If I load the action in the browser just by itself, everything looks good as well.

Edit 2

Sorry about no code examples. It I wrote this at the end of a long day of fighting this problem.

Partial View code. This is used by another partial view that performs a foreach for all of the hardware control.

<tr >
<% using(Html.BeginForm("Config", "ManualControl", FormMethod.Post, new {@class = "feedConfigForm", id = "feedConfigForm_" + Model.FeedNumber})){ %>
    <input type="hidden" name="feedNumber" value="<%= Html.Encode(Model.FeedNumber) %>" />

    <td >
        <%= Html.Encode(Model.FeedNumber) %>
    </td>
    <td>
        <%= Html.TextBox("frequency", string.Format("{0}", Model.FrequencyMHz), new { style = "text-align:right;width:50px",
                                                                                      @class = "radioControl",
                                                                                      feedNumber = Model.FeedNumber})%>

        <%= Html.Button("setFrequencyButton", "Set", HtmlButtonType.Submit, "", new { @class = "radioControl",
                                                                                      feedNumber = Model.FeedNumber})%>
    </td>
    <td>
        <%= Html.DropDownList("mode", TsesHtmlHelper.GetRadioModeSelectList(Model.Mode), new{ @class = "radioControl",
                                                                                              feedNumber = Model.FeedNumber,
                                                                                              onchange = "SubmitFeedControl($(this));"})%>
    </td>
    <td>
        <%= Html.CheckBox("transmitOn", Model.IsTransmitOn, new { @class="radioControl",
                                                                  feedNumber = Model.FeedNumber,
                                                                  onchange="SubmitFeedControl($(this));"}) %>
    </td>       
    <td>
        <%= Html.DropDownList("audioFileName", TsesHtmlHelper.GetAudioFileSelectList(Model.AudioFileName), new { @class = "audioSelection",
                                                                                                                 feedNumber = Model.FeedNumber,
                                                                                                                 isAudioPlaying = Model.IsAudioPlaying})%>
    </td>
    <td>
        <%= Html.CheckBox("audioPlaying", Model.IsAudioPlaying, new { @class = "audioEnableCheckBox",
                                                                      feedNumber = Model.FeedNumber,
                                                                      onchange="SubmitFeedControl($(this));"})%>
    </td>
<% } %>
</tr>

Javascript code making the get call. It is calling the action that returns the table partial view that then renders the above partial view.

$.get("ManualControl/GetManualFeedControlTable", function(data)
{   
    $("#feedConfigArea").html(data);                    
});