Hi All,
I am working with ATLAS technology. i am trying to imitatehttp://atlas.asp.net/quickstart/atlas/doc/services/default.aspx#webpage
"Exposing Web Services from an ASPX page"
i am having an aspx page which is inherited from our own Page class not from System.Web.UI.Page.
public partial class MainSearchPage : some namespace.MyPage
but this example does not work in this context.because in javascript, function OnWebRequestComplete1(result) returns null as result.
please help me in this issue.
thanks
Jaideep
well, i think that it should work. here's an example:
pypage.cs
namespace Test
{
public class MyPage:Page
{
[WebMethod]
public string HelloWorld(string s)
{
return "Hello '" + s + "'";
}
}
}
now, the aspx page:
Untitled Page
function handle()
{
PageMethods.HelloWorld( "Luis", handleComplete );
}
function handleComplete( res )
{
alert( res );
}
here everything is working properly...
Yes, this should work. To debug your issue, I would try:
Check on the server whether your method gets called at all.yes, my server side code in code behind of aspx is not getting called.
in javascript side:
function handle()
{
PageMethods.HelloWorld("jaideep", handleComplete );
}
function handleComplete( res )
{
debug.dump(res,"Result",true);
alert( res );
}
in debugger, result is null.also my aspx is having one user control also.i tried to put debug in my code behind.but function HelloWorld is not getting called.
any clue as to what is happening.
thanks
jaideep
after viewing request/response in Fiddler ,i got a message indicating a corrupted viewstate.
same is the problem in following post:
http://forums.asp.net/1205269/ShowPost.aspx "ViewState and Atlas ".
and as per the instruction given , i removed "type =="hidden" condition from file
Atlas.js on line 3495.and now it is working!! but this approach is correct or not?
please let me know about this.
Thanks
JAideep
Copying my reply from the other thread:
I tried a few things, but was not able to repro. Could you give this a try with the March CTP to see if it still happens?
thanks,
David
No comments:
Post a Comment