Estoy cargando por AJAX, Jquery a través de un web service, un control dinámico .ascx, lo tengo todo montado pero el return no me capta el HTLM, solo me trae [objectXMLDocument]
`public class ShopingCart : System.Web.Services.WebService
{
[WebMethod]
[ScriptMethod()]
public string AddCart(int productId, int quantity)
{
ShoppingCartManager scm = new ShoppingCartManager(new DAL.ApplicationDbContext());
var user = HttpContext.Current.User.Identity.GetUserId();
var sc = scm.GetAll().Where(e => e.User_Id == user && e.Product_Id == productId).SingleOrDefault();
if (sc != null)
sc.Quantity = sc.Quantity + quantity;
else {
ShoppingCart shoppingCart = new ShoppingCart
{
Product_Id = productId,
User_Id = user,
Quantity = quantity,
};
scm.Add(shoppingCart);
}
scm.Context.SaveChanges();
return "hola";
}
}
} `