Progress bar Control for ASP. net2.0 (Real-Time)

Source: Internet
Author: User

Control name: progressbar
Control Type: Asp. net2.0 Server Control
Initiator: bingdian3721@gmail.com
Namespace: antardev
Class Name: progressbar
Current version: 0.2.2.1 []

Description: This documentProgramIt can only be used for learning and testing purposes. Do not use it for commercial purposes.

 

The control uses the XMLHTTP component to send real-time data to the browser-side asynchronous request progress bar and responds quickly with a specific HTTP module. This control does not easily lose response or block response due to high load operations. You can adjust the progress bar according to different use cases to display the real-time progress.
Compared with previous versions, there are many improvements.
1. automatically configure web. config without manual reference to the HTTP module.
2. added the percentage attribute to help you set the progress.
3. The released assembly is accompanied by XML annotations, which can effectively use smart sensing for convenience.CodeWrite.
4. Changed the design of setting the progress bar attribute using static methods in the past, and added the progressbarcontroller control class to easily connect to the progress bar and set the progress.
5. Use the progress bar to uniquely identify the Sn for communication between the progress bar page and the method for setting the progress bar. If you have mastered the SN, you can use the progressbarcontroller class to connect to the progress bar wherever you are.
6. added the server's begin method.
7. Fixed several bugs.

 

Note:
At the same time, you must enable the session when using the pagevisit work level.


basic type
Public Enum progressbarworklevel is used to declare the control's working level
value description
the application control instance is used at the application level, the user accessing the progress bar shares an instance of the progress bar.
an instance of the pagevisit control is used for page access. each user has an exclusive progress bar.


progressbar control attribute list
default Name Description
whether the autobegin progress bar starts automatically false
the autohidden progress bar is automatically hidden. It is automatically hidden before start and after completion, and only displayed during progress. False
backcolor background color gainsboro
background image of the backimage progress bar (prior to the background color)
the initial value of the beginfromzero progress bar on the browser is 0, true
bordercolor progress bar border color gray
borderwidth progress bar Border Width 1px
forecolor foreground view royalblue
foreimage progress bar foreground image (prior to foreground color))
the fullautocomplete progress bar stops changes after completion, and triggers the oncomplete event script true
height (the progress bar prompts that the text height is not included) 20px
interval progress bar update interval, 1000 in milliseconds
the upper limit of the range used by the maximum progress bar is 100
the lower limit of the range used by the minimum progress bar is 0
the Javascript executed after the oncomplete progress bar stops changing
JavaScript executed when an error occurs in the onerror progress bar, the error here indicates a communication error.
the current percentage of percentage is 0
the unique ID of the SN progress bar. [This is the ID when the job is in application mode.]
it is displayed above the text progress bar. prompt text
textalign indicates the text Alignment Method horizontalalign. notset
textcolor indicates the text color black
the current value of value is 0
width: 400px
worklevel progress bar working level progressbarworklevel. pagevisit

 
Progressbarcontroller class:
Progress bar control class that allows you to connect to a running progress bar and operate on it

 

Constructor
Public progressbarcontroller (string Sn)
Function: initializes a new instance of progressbarcontroller.
Parameter: the unique identifier of the progress bar.

Attribute list

Description
Value to obtain or set the current value of the progress bar
Text to get or set the text displayed on the progress bar
Percentage get or set the progress percentage (greater than or equal to 0 and less than or equal to 1)
Maximum obtains the upper limit of the range used by the progress bar.
Minimum obtains the lower limit of the range used by the progress bar.

 
Method list
Description
End ends the lifecycle of a progress bar and destroys relevant data.

 
Example:

 

antardev. progressbarcontroller NPC = new antardev. progressbarcontroller ("Sn");
NPC. value + = 1;
NPC. percentage = 0.20;
NPC. TEXT = "current progress 20%";
the string "Sn" should be passed here during actual use.
Control: http://www.antardev.cn/ProgressBar0.2.2.1.rar
test program address: http://www.antardev.cn/TW0.2.2.1.rar
Note: earlier versions are no longer available for download, if special, contact me directly.
the default value of the fullautocomplete attribute is true.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.