vb.net - Trouble with async webrequest -


in first page launch async webrequest on page loaded event.

 private sub loadrecent()         dim request httpwebrequest = httpwebrequest.create("")         request.method = "get"          request.begingetresponse(new asynccallback(addressof responserecent), request)     end sub     private sub responserecent(byval asynchronousresult iasyncresult)         dim webrequest httpwebrequest = directcast(asynchronousresult.asyncstate, httpwebrequest)         dim webresponse httpwebresponse = webrequest.endgetresponse(asynchronousresult)         dim stream new streamreader(webresponse.getresponsestream())         dim responsestring = stream.readtoend      end sub 

using code, loadrecent() successfull launched on page loaded. let's suppose have button in first page brings me in page. if press button brought first page again , loadrecent() fired well. problem response of webrequest same of first time have been fired (and can tell not possible). it's should dispose async webrequest after made it.

have tried this:

wp7 httpwebrequest without caching

it suggests modify headers.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -