Selected items

Selected items

I am using ASP.NET Web Forms, I load a treeview of locations in to a dialog, the user can select multiple items, how to I transfer the selected items to the page?

I essentially need 
var list = tv.CheckedNodes
  1. <div id="dialog-message" class="standardfont" title="Select Location">
                <div>
                    <usercontrols:Locations runat="server" ID="Locations" />
                </div>
            </div>

  1. $(function () {
              $("#dialog-message").dialog({
                  modal: true,
                  buttons: {
                      Ok: function () {
                          $(this).dialog("close");
                      }
                  }
              });
          });