function GetDropDownData() {
// Get the DropDownList.
var ddlTestDropDownListXML = $( '#ddlTestDropDownListXML' );
// Provide Some Table name to pass to the WebMethod as a paramter.
var tableName = "someTable + OptionText + "");
option.attr( "value" , OptionValue);
$.ajax({
type: "POST" ,
url: "BindDropDownList.aspx/GetDropDownItems",ddlTestDropDownListXML.append(option)
);
data: '{tableName: "' + tableName + '"}' ,
},
contentType: "application/json; charset=utf-8" ,
failure: function (response)
{
alert(response.d);
}
});
}
dataType: "json",
success: function (response) {
// Now find the Table from response and loop through each item (row).
$(response.d).find(tableName).each( function () {
// Get the OptionValue and OptionText Column values.
var OptionValue = $( this ).find( 'OptionValue' ).text();
var OptionText = $( this ).find( 'OptionText' ).text();
// Create an Option for DropDownList.
var option = $( "
|