P
pbd22
Hi There.
I think i need some software design help.
I have a page, server.aspx, that starts uploading video files when it
is loaded via hidden iframe by the client. On the same page is an
event handler (below) that produces useful data about the upload
(percent, time, bytes, etc).
MY PROBLEM is that the server.aspx file is being used for video
uploads and I need to create a second polling routine on the client
that polls upload data provided by the onIncrementCallback method. I
can't call server.aspx twice (for two different purposes) in my client-
side querystring.
How do i query the info provided by the event handler when the same
page is being used for video uploads?
Thanks!
___________________________________________________
Public Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Me.Load
For iFile = 0 To uploadFiles.Count - 1
Dim workThread As New Thread(New ThreadStart(AddressOf upload.doWork))
Dim postedFile As HttpPostedFile = uploadFiles(iFile)
upload.FileName = postedFile.FileName
AddHandler upload.Incremented, AddressOf
onIncrementCallback
If Not postedFile.FileName.Equals("") Then
workThread.Start()
upload.UploadFile(postedFile.FileName)
workThread.Join()
End If
RemoveHandler upload.Incremented, AddressOf
onIncrementCallback
Next iFile
End Sub
Public Sub onIncrementCallback(ByVal sender As Object, ByVal e As
IncrementEventArgs)
' DATA SUCH AS e.Progress, e.TotalBytes, e.CurrentBytes, e.Time ETC IS
DYNAMICALLY UPDATED AND MADE AVAILABLE HERE.
End Sub
I think i need some software design help.
I have a page, server.aspx, that starts uploading video files when it
is loaded via hidden iframe by the client. On the same page is an
event handler (below) that produces useful data about the upload
(percent, time, bytes, etc).
MY PROBLEM is that the server.aspx file is being used for video
uploads and I need to create a second polling routine on the client
that polls upload data provided by the onIncrementCallback method. I
can't call server.aspx twice (for two different purposes) in my client-
side querystring.
How do i query the info provided by the event handler when the same
page is being used for video uploads?
Thanks!
___________________________________________________
Public Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Me.Load
For iFile = 0 To uploadFiles.Count - 1
Dim workThread As New Thread(New ThreadStart(AddressOf upload.doWork))
Dim postedFile As HttpPostedFile = uploadFiles(iFile)
upload.FileName = postedFile.FileName
AddHandler upload.Incremented, AddressOf
onIncrementCallback
If Not postedFile.FileName.Equals("") Then
workThread.Start()
upload.UploadFile(postedFile.FileName)
workThread.Join()
End If
RemoveHandler upload.Incremented, AddressOf
onIncrementCallback
Next iFile
End Sub
Public Sub onIncrementCallback(ByVal sender As Object, ByVal e As
IncrementEventArgs)
' DATA SUCH AS e.Progress, e.TotalBytes, e.CurrentBytes, e.Time ETC IS
DYNAMICALLY UPDATED AND MADE AVAILABLE HERE.
End Sub