var ddlFromWarehouseClientId = document.getElementById("ctl00_ContentPlaceHolder1_grdStockTransfer_ctl01_ddlFromWarehouse");
ddlFromWarehouseClientId.innerHTML = "";
var res1 = (AjaxFunctions.GetStockTranseferData()).value;
ddlFromWarehouseClientId.options.add(new Option("Select", "0", false, false));
var i = 0;
if (res1.Rows.length > 0) {
//CId.options.length = 0;
for (i = 0; i <= res1.Rows.length - 1; i++) {
ddlFromWarehouseClientId.options.add(new Option(res1.Rows[i].Name, res1.Rows[i].Id, false, false));
}
}
Name and Id are database field name
How to call ajax function from client side see my earlier post
http://rajendramalav.blogspot.com/2009/07/call-server-side-method-from-client
2 comments:
8uy
nice code....
Post a Comment