Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

uncaught reference error:pagemethods are not defined

$
0
0

hi all

i 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)
{

////////////////////////////////////

}


Viewing all articles
Browse latest Browse all 5678

Trending Articles