KoffeeKoder





  • by aru on 7/21/2008 5:33:48 AM
  • How can i manually write output to browser for for the same context for the below scenario..

    Thanks in Advance..


    Protected Sub Button1_Click(ByVal sender As _
    Object, ByVal e As System.EventArgs) Handles Button1.Click




    If ThreadPool.QueueUserWorkItem( _
    New WaitCallback(AddressOf LongTimeTask), TextBox1.Text) _
    Then
    Label2.Text = "Queued successfully"
    Else
    Label2.Text = "Failed"
    End If

    End Sub
    Private Sub LongTimeTask(ByVal s As Object)
    Dim context As HttpContext = HttpContext.Current

    Dim i As Integer
    Dim str As String
    str = s.ToString

    For i = 0 To 10 '000
    str = str + "--" + str
    Next

    ''????????
    ''How can write output to browser.
    End Sub
    End Class