Eis como menciono duas condições, se esta ou esta
if (Type == 2 && PageCount == 0) || (Type == 2 && PageCount == '')
PageCount= document.getElementById('<%=hfPageCount.ClientID %>').value;
}
basta adicioná-los dentro do colchete principal do if, como
if ((Type == 2 && PageCount == 0) || (Type == 2 && PageCount == '')) {
PageCount= document.getElementById('<%=hfPageCount.ClientID %>').value;
}
Logicamente, isto também pode ser reescrito de uma forma melhor! **Isto tem exactamente o mesmo significado***
if (Type == 2 && (PageCount == 0 || PageCount == '')) {