473,382 Members | 1,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

File upload with Progressbar in web application

Malathi
31
Hi,

Ive a vb.net web app in which one of the Content pages has asp upload control. The file to be uploaded has 2000 records which are in server. If this file is uploaded via this control, all the 2000 files will be uploaded. Its like by uploading single file into the control, we are uploading mulitple files. During the uploading I need a progress bar with current status like number of files getting updated. Without Ajax I need to do this. Any help is much appreciated.

Thanks,
Malathi
Oct 19 '12 #1
2 2449
PsychoCoder
465 Expert Mod 256MB
I would use jQuery to accomplish this. Using jQuery or AJAX is your only choice (or some Flash controls)
Oct 20 '12 #2
Malathi
31
Thanks for the reply. The following code does the job but its showing the script only once once and it merges all the earlier inputs.
Expand|Select|Wrap|Line Numbers
  1.  For i As Integer = 0 To 20
  2.                If i Mod 3 = 0 Then
  3.                 Dim strmsg As String = Convert.ToString(i) & " files are uploaded!"
  4.                 Dim a As String = "<script  language='javascript' type='text/javascript'>" & ControlChars.CrLf & " function Warning()  { " & ControlChars.CrLf & " Win_Warning = window.open('','Win_Warning','top=50,screenY=50,center=yes,width=100,height=100,scrollbars=no,scrollbar=no,menubar=no'); " & ControlChars.CrLf & " Win_Warning.document.write('" & strmsg & "'); Win_Warning.focus();" & ControlChars.CrLf & "  setTimeout('Win_Warning.close()',2000);" & ControlChars.CrLf & "} " & ControlChars.CrLf & "  </script>"
  5.                 Dim myscript As String = "myscript" + Convert.ToString(i)
  6.                 Page.ClientScript.RegisterClientScriptBlock(GetType(Page), myscript, a, False)
  7.                 Dim script1 As String = "script" + Convert.ToString(i)
  8.                 ClientScript.RegisterClientScriptBlock(GetType(Page), script1, "<script language='javascript'>Warning();</script>", False)
  9. End if
  10. Next
  11.  
The output for this code in new window is,
3 files are uploaded!
6 files are uploaded!
.
.
18 files are uploaded!
And the window automatically closes after 2 secs.Some error in using clientscript method. If you identify please let me know.
Oct 23 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: R Reyes | last post by:
I am trying to code a file uploader (for forum/email attachments) from the client computer to a remote web server via the PUT method (since POST is not allowed ). However, the upload works ONLY...
3
by: parthivjoshi | last post by:
Do anyone have the idea how to add progressbar to the existing HTTPModule and HTTPApplication for File Upload. ********************************************************************** Sent via...
3
by: Pitcairnia | last post by:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about...
1
by: Stanislav Simicek | last post by:
Hello, I would like to ask for any ideas how to do user authorization for file upload which is done via an external application (not HtmlInputFile control). I have an asp.net web site which...
4
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use...
3
by: Mike Kelly | last post by:
Hi. I've built a page using standard ASP.NET 2.0 features and when I upload a large file (>20MB) to our intranet server, I get a paltry 100KB/s on our 100Mb/s LAN. Simply copying the file, I get...
0
by: Raven Jones | last post by:
Heya all, I'm working on a web-based application (using ASP.NET and C# on .NET 1.1.4322, supporting only IE6 for Windows) that allows for file uploads. Screen real estate is at a premium, so I...
2
by: iavian | last post by:
Hi What is the easiest way to have file upload progressbar with cool AJAX with complete sample code ..
7
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
5
by: John Devlon | last post by:
Hi, Some people like to go on vacation during christmas time, others try to do something they never did before.... I would like to create a multiple file upload page, with some nice progress...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.