javascript - ASP.Net Display Different Text in Label Control At Interval -
I have an old web application written in ASP.NET 2.0+ AJAX.
I have a text box control in my page and a button and a label control that is inside an updated panel.
A text will be entered in the textbox and later, on the textworld event of control, some server-side processing and data validation are included.
I am using label control as a control so that the progress of the user can be progressed. Different messages can appear in the label control.
In the current scenario, only the last string labeled for the label control is displayed on the control.
I'm looking for ways to be able to display different text on label control, say at a 5 second interval.
Is there an AJAX control for this (or something that I could use), where I can specify the text to appear at intervals of seconds?
How do I get it? The input is highly appreciated thanks.
Edit I think I may need to make a phrase again to simplify this question.
After posting an Asp.net page, how will I be able to specify different text strings in label control which must be displayed after every N seconds? Like
Label1.Text = "Message 1"
.. 5 seconds delay
Label1.Text = "Next message"
.. delay 5 seconds
Label1.Text = "second message"
.. delay 5 seconds
Label1.Text = "Last message"
In the current post back model (which includes AJAX UpdatePanel also), only the last message is displayed.
Please advise. Thank you.
If the label control is included in the update panel, call your code using the system Please. Timers Timer
Dim Sever Timer As New System Tires Timer () as a slow message stack (of the string) = nothing sub-display message (ByVal msg) in the form of a string, as a complete interval) Msgstack = new stack (for string) as the integer for i = 0 to msg. Line - 1 msgstack.Push (msg) Next Timer Interval = Interval timer.autoreset = True Timer.start () End Sub Private handles all timer_allabsed (only the sender in the form of the object, as the e-mail system in the form of the timer. AspenEventAgent) timer. If msgstack.Count & gt; 0 Then Label1.Text = msgStack.Pop () Other timers. Stop the end (if end) end
order your message input list for the first position message
Comments
Post a Comment