Click here to Skip to main content
15,887,596 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: URGENT! - Passing value from one page to another? Pin
N a v a n e e t h20-Feb-08 19:36
N a v a n e e t h20-Feb-08 19:36 
GeneralRe: URGENT! - Passing value from one page to another? Pin
Christian Graus20-Feb-08 21:01
protectorChristian Graus20-Feb-08 21:01 
GeneralRe: URGENT! - Passing value from one page to another? Pin
J4amieC20-Feb-08 23:04
J4amieC20-Feb-08 23:04 
QuestionWhich control can I use? Pin
ss.mmm20-Feb-08 11:28
ss.mmm20-Feb-08 11:28 
AnswerRe: Which control can I use? Pin
Christian Graus20-Feb-08 11:51
protectorChristian Graus20-Feb-08 11:51 
General(performacne) difference between Session and static class Pin
Seishin#20-Feb-08 11:03
Seishin#20-Feb-08 11:03 
GeneralRe: (performacne) difference between Session and static class Pin
Guffa20-Feb-08 11:33
Guffa20-Feb-08 11:33 
Questionconfusion over asynchronous methods inside web service Pin
ekynox20-Feb-08 10:31
ekynox20-Feb-08 10:31 
Hi there,

I have been looking into implementing Asynchronous programming model within my webservice and my asp.net web form. I have found a few good MSDN articles, [^], to achieve this but there is one thing I do not quite follow. My webservice code is as listed below.

I add all the relevant code including a web reference to my HelloWorldWebService in my asp.net web form to utilise PageAsyncTask functionality. One thing I have noticed is that when I create an instance of the HelloWorldWebService web service, it does not display the BeginHelloWorldProcedure and EndHelloWorldProcedure methods and the only asynchronous method HelloWorldProcedureAsync is displayed

My questions are:

1) why am not seeing BeginHelloWorldProcedure and EndHelloWorldProcedure methods ?

2)If I am supposed to use HelloWorldProcedureAsync method how does this supply the IAsyncResult which is the output of BeginEventHandlder part of the input of PageAsyncTask

Any help will be appreciated.

thanks.

<br />
   [WebService]<br />
    public class HelloWorldWebService : System.Web.Services.WebService<br />
    {<br />
        public delegate string HelloWorldAsyncStub();<br />
<br />
<br />
        public string HelloWorldProcedure()<br />
        {<br />
            return "HelloWorld";<br />
        }<br />
<br />
        public class MyState<br />
        {<br />
            public object previousState;<br />
            public HelloWorldAsyncStub helloworldStubStub;<br />
        }<br />
<br />
        [System.Web.Services.WebMethod]<br />
        public IAsyncResult BeginHelloWorldProcedure(AsyncCallback cb, object s)<br />
        {<br />
            HelloWorldAsyncStub stub = new HelloWorldAsyncStub(HelloWorldProcedure);<br />
<br />
            MyState ms = new MyState();<br />
            ms.previousState = s;<br />
            ms.helloworldStubStub = stub;<br />
            return stub.BeginInvoke(cb, ms);<br />
        }<br />
<br />
        [System.Web.Services.WebMethod]<br />
        public string EndHelloWorldProcedure(IAsyncResult call)<br />
        {<br />
            MyState ms = (MyState)call.AsyncState;<br />
            return ms.helloworldStubStub.EndInvoke(call);<br />
        }<br />
    }<br />

GeneralRe: confusion over asynchronous methods inside web service Pin
Venkatesh Mookkan20-Feb-08 15:49
Venkatesh Mookkan20-Feb-08 15:49 
GeneralRe: confusion over asynchronous methods inside web service Pin
ekynox21-Feb-08 9:53
ekynox21-Feb-08 9:53 
GeneralDynamic linkbuttons and event wiring Pin
Glenn E. Lanier II20-Feb-08 9:17
Glenn E. Lanier II20-Feb-08 9:17 
GeneralRe: Dynamic linkbuttons and event wiring Pin
Christian Graus20-Feb-08 11:50
protectorChristian Graus20-Feb-08 11:50 
QuestionRe: Dynamic linkbuttons and event wiring Pin
Glenn E. Lanier II21-Feb-08 3:07
Glenn E. Lanier II21-Feb-08 3:07 
AnswerRe: Dynamic linkbuttons and event wiring Pin
Glenn E. Lanier II21-Feb-08 4:10
Glenn E. Lanier II21-Feb-08 4:10 
GeneralProgrammatically Setting Virtual Direction Expiration Pin
crystal915420-Feb-08 8:17
crystal915420-Feb-08 8:17 
Questioncan i link my javascript to a slideshow Pin
young34520-Feb-08 7:38
young34520-Feb-08 7:38 
AnswerRe: can i link my javascript to a slideshow Pin
Not Active20-Feb-08 7:52
mentorNot Active20-Feb-08 7:52 
GeneralRe: can i link my javascript to a slideshow Pin
young34520-Feb-08 9:16
young34520-Feb-08 9:16 
GeneralRe: can i link my javascript to a slideshow Pin
Not Active20-Feb-08 13:05
mentorNot Active20-Feb-08 13:05 
GeneralRe: can i link my javascript to a slideshow Pin
young34520-Feb-08 20:11
young34520-Feb-08 20:11 
GeneralGet User.Identity.Name on login page Pin
AlexeiXX320-Feb-08 7:31
AlexeiXX320-Feb-08 7:31 
GeneralRe: Get User.Identity.Name on login page Pin
Not Active20-Feb-08 7:44
mentorNot Active20-Feb-08 7:44 
GeneralRe: Get User.Identity.Name on login page Pin
AlexeiXX320-Feb-08 7:51
AlexeiXX320-Feb-08 7:51 
GeneralRe: Get User.Identity.Name on login page Pin
AlexeiXX320-Feb-08 7:55
AlexeiXX320-Feb-08 7:55 
GeneralTextarea.Value Commit issue Pin
gavin lane20-Feb-08 0:58
gavin lane20-Feb-08 0:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.