I have two functions like-------------
public static string loadTaskDetails(string projectTaskidwithabbv)
public static string loadWorkNote(string projecttaskidwithabbv)
This methods are called by ajax,and they are async.
Now loadTaskDetails() is calling a webservice (asmx) method and loadWorkNote() is calling another.
Problem is I can't make the two functions parallel.
If I use [System.Web.Services.WebMethod(enablesession=false)] above the loadWorkNote() and use thread.sleep(8000),its still freezing the main dom. After its execution completed,loadTaskDetails() is started working.
But if I use enablesession=false in @page directive of this page,then its working parallely.
So my questions are...................
1)If I use session in this page,"enablesession=false" in @page will create problem or not?If yes,then how to implement this?
2)why "enablesession=false" didn't work for a particular webmethod?If it works then I don't have to create this in @page for whole page.
3) In some example I'm seeing they are creating async call of webservice method (kiteserv.loadWorkNoteByTaskidAsync()) and calling methodcompleted event (kiteserv.loadWorkNoteByTaskidCompleted += delegate(object sender, kitesRef.loadWorkNoteByTaskidCompletedEventArgs e))
I've tried this.
1)From the completed event I can't return string value but loadWorkNote() must return string.
2)If I use return out of the scope of completed event,my code first reaches to return statement and return blank value and then completed event fired which is returning nothing as usual.
So please help me what am I doing wrong and what's the correct process.Actually I've implemented web services before but want to use thread first.