Pagemethods are not defined
hi alli am trying to call server side method on client side
but i am getting error as "uncaught reference error:pagemethods are not defined"
my code is
<asp:LinkButton ID="ibtncommonzoom" runat="server" class="mdi-action-find-in-page" Width="25%" Height="25%" OnClientClick="ibtncommonzoom_Click()" ></asp:LinkButton>
<script type="text/javascript">
function ibtncommonzoom_Click()
{
var queryID = document.getElementById('<%=Label1.ClientID %>').innerText;
var name = ddlcommon.options[ddlcommon.selectedIndex].value;
var area = null;
var no = null;
if (name != "0") {
PageMethods.zoomlayers(queryID, name, area, no);
}
return false;
}
</script>
aspx.cs
[ScriptMethod, WebMethod]
public void zoomlayers(string queryID, string name, string area, string no)
{
////////////////////////////////////
}