1 Scope of application
This component is a component of the RAD component package that supports application systems for the. NET Framework 1.1 and 2.0,B/S architectures.
Support IE, Firefox and many other browsers.
2 control functions
Click on upload progress bar to upload
Advantages:
1 Upload real-time progress bar with Ajax. Uploading to large files
2 Upload file size, type, after uploading the directory save is encapsulated, to formulate a few properties on the line
2.1 Height Package
The structure is relatively simple and has been encapsulated
2.2 How to use
1 First-in R.A.D UPLOAD controls, or install the entire R.A.D control package
2 referencing this component in the development environment RadUpload.Net.dll
3 can be directly in the toolbar to drag the interface
The simplest to use
<%@ Register tagprefix= "RadU" namespace= "Telerik.webcontrols" assembly= "Radupload.net2"%>
1.
<radu:radupload id= "Upload1" runat= "Server" >
</radU:RadUpload>
2.3 Points
1 upload large files, can be configured in System.Web
<configuration>
<system.web>
</system.web>
</configuration>
3 Upload progress bar
<radu:radupload id= "RadUpload1" runat= "Server"/>
<radu:radprogressarea id= "RadProgressArea1" runat= "Server"/>
<radu:radprogressmanager id= "RadProgressManager1" runat= "Server"/>
<asp:button id= "Button1" runat= "Server" text= "Submit"/>
private void Looongmethodwhichupdatestheprogresscontext (UploadedFile file)
{
const int total = 100;
Radprogresscontext progress = radprogresscontext.current;
for (int i=0; i<total; i++)
{
progress["Secondarytotal"] = total. ToString ();
progress["Secondaryvalue"] = i.ToString ();
progress["secondarypercent"] = i.ToString ();
progress["Currentoperationtext"] = file. GetName () + "is being processed ...";
if (! response.isclientconnected)
{
Cancel button was clicked or the browser is closed, so stop processing
Break
}
Stall the current thread for 0.1 seconds
System.Threading.Thread.Sleep (100);
}
}
private void Button1_Click (object sender, System.EventArgs e)
{
UploadedFile file = Raduploadcontext.current.uploadedfiles[file1.uniqueid];
if (file! = null)
{
Looongmethodwhichupdatestheprogresscontext (file);
}
}
protected void Page_Load (Object sender, System.EventArgs e)
{
if (! IsPostBack)
{
Do not display Selectedfilescount progress indicator.
Radprogressarea1.progressindicators = Progressindicators.currentfilename |
Progressindicators.filescount |
Progressindicators.filescountbar |
progressindicators.filescountpercent |
Progressindicators.requestsize |
progressindicators.timeelapsed |
progressindicators.timeestimated |
progressindicators.totalprogress |
Progressindicators.totalprogressbar |
progressindicators.totalprogresspercent |
Progressindicators.transferspeed;
radprogressarea1.localization["uploadedfiles"] = "processed";
radprogressarea1.localization["totalfiles"] = "";
radprogressarea1.localization["currentfilename"] = "File:";
Radprogresscontext progress = radprogresscontext.current;
Prevent the secondary progress from appearing when the file is uploaded (FileCount etc.)
progress["secondarytotal"] = "0";
progress["Secondaryvalue"] = "0";
progress["secondarypercent"] = "0";
}
}
Custom progress bar
<radu:radprogressarea runat= "Server" id= "RadProgressArea1" skin= "Vista"
progressindicators= "Filescount,filescountbar,filescountpercent"/>
4 Control Usage Instructions
After you install the R.A.D control installation package, view the component's detailed use Help
5 areas to be improved
Reference 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
rad upload Space Two development guide