﻿
function GetControlData(panel,controlID) {
    
    $.ajax({
        async: false,
        type: "POST",
        url: wsServerLocation + "/Services/RenderService.asmx/GetControlHtml",
        data: "{'controlID':'" + controlID + "'}",
        dataType: "json",
        contentType: "application/json; charset=utf-8",
        beforeSend: function(XMLHttpRequest) {
        $("#" + panel).html("<div>Please wait while data is loading....<img src='" + wsServerLocation + "/Images/Loading.gif' /></div>");
        }, 
        success: function(html) {
            $("#" + panel).html(html.d);
        },
        error: function(XMLHttpRequest, textStatus, error) { alert(XMLHttpRequest + ":" + textStatus + ":" + error.get_message()); }
    });
}