Tuesday, 15 June 2010

Page methods in asp.net not working -



Page methods in asp.net not working -

i have page method following,

protected void authuser(string uid,string pass) {}

and making phone call javascript this

pagemethods(uid,pass,success,error)

but it's not working

there few steps ensure page methods work.

ensure have script manager defined page methods enabled

<asp:scriptmanager id="scriptmanager1" runat="server" enablepagemethods="true" />

define code behind web method attribute

[system.web.services.webmethod] public static bool authuser(string uid,string pass) { homecoming true; // validation returning true if authenticated }

define methods in client script phone call web method.

pagemethods.authuser(uid, pass, function(result) { /* succeed */ }, function(error) { });

asp.net-2.0

No comments:

Post a Comment