I have a LinkButton in a ListView in an UpdatePanel. I would like the button (well, any of them) to cause a partial postback, but they are causing a full page postback.
I resolved this problem by setting: ClientIDMode="AutoID" on the page directive of the applicable page like so:<%@ Page Title="" ClientIDMode="AutoID" Language="C#"%>, thus resolving my previous problem of having an ASP linkbutton within a ListView to cause a full postback.
However, this may require that any ASP control on the client code (Jquery, Javascript) be referred to by it's full name as it appears in the browser source code (I use Firebug in Firefox to get the names). For example, this Jquery function $("#ContentPlaceHolder1_btnCancelReferCustomer").click(function () {
$("#divRefer").hide({ effect: "slide", duration: 200 });
return false;
});
was changed to this (please note the asp button name change in selector):
$("#ctl00_ContentPlaceHolder1_btnCancelReferCustomer").click(function () {
$("#divRefer").hide({ effect: "slide", duration: 200 });
return false;
});