return partial view as string
<p>I'm trying to reduce the number of get requests I make to the server.  I would like to return the partial view to my <code>$.get</code> method as a string so that I can return 3 of them at once instead of having 3 seperate server callbacks.  is there anyway to do this.  so far I have  </p>

<p>so far it just returns System.Web.Mvc.PartialViewResult</p>

<pre><code>function updateChat() {

/** I want to make this work so I only have 1 callback */
$.get("Home/refreshChatParts", {}, function (response) {
    var html = response.split(",");
    $("#chatWindow").replaceWith(html[0]);
    $("#chatHeader").replaceWith(html[1]);
    $("#playerList").replaceWith(html[2]);
});

/**  this stuff works, but is a lot of call backs */
$.get("Home/refreshChatText", {}, function (html) {
    $("#chatWindow").replaceWith(html);
});

$.get("Home/refreshChatHeader", {}, function (html) {
    $("#chatHeader").replaceWith(html);
});

$.get("Home/refreshPlayerList", {}, function (html) {
    $("#playerList").replaceWith(html);
});
*/
$.get("Home/getRequest", {}, function (requestUser) {
    if (requestUser.toString() != "failed") {
        pause = true;
        var join = confirm(requestUser + " would like to play a game with you");
        if (join) {
            startGame(requestUser);
        } else
            pause = false;
        resetRequestUser(requestUser);
    }
});

//$.get("Home/checkForGameStart", {}, function (response) { /*alert(response);*/ });

scrollChatDown();

setTimeout('updateChat()', 20000);
}




 public String refreshChatParts() {

        //refresh chat text
        ViewData["ChatText"] = getFormatedChatText();

        //refresh usercount
        try {
            userCount = getUserCount();
            ViewData["numberOfUsers"] = "There are " + userCount + " players online";
        } catch (Exception e) { ViewData["numberOfUsers"] = e.Message; }

        //refresh player list
        ViewData["listOfPlayers"] = getFormatedPlayerList();

        checkForGameStart();

        return PartialView("ChatText") + "," + PartialView("ChatHeader") + "," + PartialView("playerList");
    }
</code></pre>
