obout
obout.com Home
|
Quick Links
Search
ASP TreeView
Examples
How-Tos and Help
ASP.NET Grid
Examples
Documentation
SlideMenu
Examples
How-Tos and Help
Calendar
Examples
Tutorials
Documentation
Splitter
Examples
How-Tos and Help
Easy Menu
Examples
How-Tos and Help
HTML Editor
Examples
How-Tos and Help
Window
Examples
How-Tos and Help
Purchase
Purchase page
Ordering/Licensing details
Install
Add to VS 2005
Add to project
Support
Contact Us
obout.com
obout.com Home
obout FileUploadProgress
Download
FileUploadProgress home
Working examples
- 9
Default settings
Show uploaded files names
Client-side events handling
Another style
Localization
Custom time format
Preserve space
Allowed file extensions and sizes
StatusPanel
control use
Add/delete file inputs
Customize
- 2
Custom style file
Custom localization file
Configuration
- 3
obout_FileUpload DLL
web.config
- 2
UploadProgressModule
UploadProgressHandler
Documentation
- 4
Server side properties
Client side interface
- 3
OnClientProgressRefreshed
OnClientFileCleared
OnClientFileRejected
Change Log
This example demonstrates
FileUploadProgress
and
StatusPanel
controls use.
You will see that after uploading finish the page is not reloaded.
Example code
<
%@ Register
TagPrefix
="fup"
Namespace
="OboutInc.FileUpload"
Assembly
="obout_FileUpload"
%
>
<
script
runat
="server"
language
="c#">
void
Page_load(
object
sender,
EventArgs
e) {
if
(Page.IsPostBack)
{
HttpFileCollection
files = Page.Request.Files;
if
(files.Count == 0)
ServerResponse.Text =
"no file"
;
else
{
ServerResponse.Text =
"<b>Successfully uploaded file:</b><br />"
;
ServerResponse.Text +=
"<span style='color:#0033cc;'>"
+ files[0].FileName +
"</span>"
;
ServerResponse.Text +=
" "
+files[0].ContentLength.ToString() +
" bytes"
;
}
}
}
</
script
>
<
script
type
="text/JavaScript">
function
Clear(){ document.getElementById(
"
<%= ServerResponse.ClientID %>
"
).innerHTML=
""
;}
</
script
>
...
<
input
type
=file
name
="myFile1"><
br
/>
<
input
type
=submit
value
="submit"
name
="mySubmit"><
br
/>
<
fup:FileUploadProgress
runat
="server"
OnClientProgressStarted
="Clear"
/
>
<
fup:StatusPanel
runat
="server"
>
<
asp:Label
runat
="server"
id
="ServerResponse"
Text
=""
/
>
<
/
fup:StatusPanel
>
Uploaded 
% (
) Total
Uploaded
files
file
from
Uploading file
Last uploaded file
:
Elapsed time:
Estimated time:
Speed:
Please visit
HOW-TO and Help
page for any questions.
"
OUT of all the components I have ever used, your components ARE the best! BAR NONE!! Keep it UP!!!
"
Johnnie Gazaway
JBM, Inc.
© Copyright 2000-2008 obout inc. All rights reserved.
Terms of Use
|
Privacy Statement