473,761 Members | 4,407 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client Callbacks And Event Handlers


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 onIncrementCall back 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.EventArg s) Handles Me.Load

For iFile = 0 To uploadFiles.Cou nt - 1

Dim workThread As New Thread(New ThreadStart(Add ressOf upload.doWork))
Dim postedFile As HttpPostedFile = uploadFiles(iFi le)
upload.FileName = postedFile.File Name
AddHandler upload.Incremen ted, AddressOf
onIncrementCall back
If Not postedFile.File Name.Equals("") Then
workThread.Star t()
upload.UploadFi le(postedFile.F ileName)
workThread.Join ()
End If

RemoveHandler upload.Incremen ted, AddressOf
onIncrementCall back
Next iFile
End Sub

Public Sub onIncrementCall back(ByVal sender As Object, ByVal e As
IncrementEventA rgs)

' DATA SUCH AS e.Progress, e.TotalBytes, e.CurrentBytes, e.Time ETC IS
DYNAMICALLY UPDATED AND MADE AVAILABLE HERE.

End Sub

Mar 15 '07 #1
3 1160
"pbd22" <du*****@gmail. comwrote in news:1173987212 .026578.142700
@y80g2000hsf.go oglegroups.com:
How do i query the info provided by the event handler when the same
page is being used for video uploads?
You need to do this through asynchronous javascript ... with Ajax or a
second iframe reloading the server.aspx page.
Mar 16 '07 #2
On Mar 15, 8:29 pm, Spam Catcher <spamhoney...@r ogers.comwrote:
"pbd22" <dush...@gmail. comwrote in news:1173987212 .026578.142700
@y80g2000hsf.go oglegroups.com:
How do i query the info provided by the event handler when the same
page is being used for video uploads?

You need to do this through asynchronous javascript ... with Ajax or a
second iframe reloading the server.aspx page.

THanks for your response.
I am doing that. Or, that was what I intended.
I guess my question is - can I use the same
page for two different iframe (or ajax) RPC calls?
Server.aspx is used to upload the videos for the
first and return video upload information for the
second. Will two different calls targeting the same
page matter?

Mar 16 '07 #3
"pbd22" <du*****@gmail. comwrote in news:1174064828 .793247.122930
@y66g2000hsf.go oglegroups.com:
can I use the same
page for two different iframe (or ajax) RPC calls?
Server.aspx is used to upload the videos for the
first and return video upload information for the
second. Will two different calls targeting the same
page matter?
Each time a page is called in ASP.NET it is a new instance. So yes, you can
call it multiple times.

Of course you'll need to distinguish each different type of calls - which
can be done with query strings. Or you could create different pages - 1 for
polling and 1 for upload. There are many different ways of doing what you
intend.
Mar 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2123
by: MonkeyBoy | last post by:
I am doing some some HTML manipulation in client-side script (IE5.x and IE6.x browsers only). Something like.. var tmpHTML = oTable.outerHTML // do something to the HTML her oTable.outerHTML = tmpHTML Before the changes, client-side .Net field validators (RegularExpressionValidator, RangeValidator, etc.) work fine... after the changes, the modified HTML works correctly but the validators stop functioning. Seems that the onchange handler...
1
2680
by: Jim Hammond | last post by:
I can get data from a client-side assembly to the server in two manual steps, but I need to be able to do it in one step. Step 1: The user presses the manually coded "Step 1" button, which calls the JavaScript function. The function copies the data into a server textbox control. Step 2: The user presses the VS generated "Step 2" button, which calls the
2
1392
by: MonkeyBoy | last post by:
I am doing some some HTML manipulation in client-side script (IE5.x and IE6.x browsers only). Something like.. var tmpHTML = oTable.outerHTML // do something to the HTML her oTable.outerHTML = tmpHTML Before the changes, client-side .Net field validators (RegularExpressionValidator, RangeValidator, etc.) work fine... after the changes, the modified HTML works correctly but the validators stop functioning. Seems that the onchange handler...
1
266
by: MonkeyBoy | last post by:
I am doing some some HTML manipulation in client-side script (IE5.x and IE6.x browsers only). Something like.. var tmpHTML = oTable.outerHTML // do something to the HTML her oTable.outerHTML = tmpHTML Before the changes, client-side .Net field validators (RegularExpressionValidator, RangeValidator, etc.) work fine... after the changes, the modified HTML works correctly but the validators stop functioning. Seems that the onchange handler...
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.