$("[id*=DropDownListSubBrand]").change(function () {
var subBrandval = $('[id*=DropDownListSubBrand]').val();
alert(subBrandval);
$.ajax({
type: "POST",
url: "PrintEmployee.aspx/OnSubBrandChange",
data: "{'Brand_Id':'" + $('[id*=DropDownListSubBrand]').val() + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
beforeSend: function() { $("#wait").show(); },
complete: function() { $("#wait").hide(); },
success: function(data) { alert(data.d); },
error: function() { alert('Error Occured'); }
});
and in C# Code just write
[System.Web.Services.WebMethod]
public static string OnSubBrandChange(int Brand_Id)
{
Brand objBrand = new Brand();
string strBrand=objBrand.GetBrand(Brand_Id);
return strBrand;
}