473,386 Members | 1,647 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,386 software developers and data experts.

how to display a label only a while?

Cas
Hi,

I want to display a label a few seconds, then make it invisible.
I tried with for next, but it doesn't work.

Thanks for help
Cas
Aug 21 '06 #1
3 1552
Hi Cas,

it would work if you placed an application.doevents()
within the loop. But do not do it.

Place a timer and take care of the label when the
first event fires. Then you can disable or dispose the timer.

Tommaso

Cas ha scritto:
Hi,

I want to display a label a few seconds, then make it invisible.
I tried with for next, but it doesn't work.

Thanks for help
Cas
Aug 21 '06 #2
Cas
Hi, thanks for replying ..

I tried this but the label doesn't appear: (the label must appear 3 seconds
when the record is inserted in the detailsview).

Do you see the error?
Thanks again

Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DetailsViewInsertedEvent Args) Handles
DetailsView1.ItemInserted
Dim t As New Timers.Timer(3000)
AddHandler t.Elapsed, AddressOf TimerFired
t.Enabled = True
End Sub

Public Sub TimerFired(ByVal sender As Object, _
ByVal e As System.Timers.ElapsedEventArgs)
Label1.Text = "yes!"
End Sub

<to**************@uniroma1.itschreef in bericht
news:11**********************@74g2000cwt.googlegro ups.com...
Hi Cas,

it would work if you placed an application.doevents()
within the loop. But do not do it.

Place a timer and take care of the label when the
first event fires. Then you can disable or dispose the timer.

Tommaso

Cas ha scritto:
>Hi,

I want to display a label a few seconds, then make it invisible.
I tried with for next, but it doesn't work.

Thanks for help
Cas

Aug 21 '06 #3
I thought you were talking about a win application.

On web apps the events are done on the server. So if there
is no postback you will not see the result.

Tommaso

Cas ha scritto:
Hi, thanks for replying ..

I tried this but the label doesn't appear: (the label must appear 3 seconds
when the record is inserted in the detailsview).

Do you see the error?
Thanks again

Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DetailsViewInsertedEvent Args) Handles
DetailsView1.ItemInserted
Dim t As New Timers.Timer(3000)
AddHandler t.Elapsed, AddressOf TimerFired
t.Enabled = True
End Sub

Public Sub TimerFired(ByVal sender As Object, _
ByVal e As System.Timers.ElapsedEventArgs)
Label1.Text = "yes!"
End Sub

<to**************@uniroma1.itschreef in bericht
news:11**********************@74g2000cwt.googlegro ups.com...
Hi Cas,

it would work if you placed an application.doevents()
within the loop. But do not do it.

Place a timer and take care of the label when the
first event fires. Then you can disable or dispose the timer.

Tommaso

Cas ha scritto:
Hi,

I want to display a label a few seconds, then make it invisible.
I tried with for next, but it doesn't work.

Thanks for help
Cas
Aug 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Arash | last post by:
hi, I read couple of emails in the group regarding using the form to display a message (instead of MsgBox which needs user input to be closed). I'm not very familiar with forms, I would...
4
by: Patrick.O.Ige | last post by:
I'm DataBinding a CheckBoxList and i want to get the checkboxes selected when the page is loaded depending on a Boolean value from the Database.. chkDebtor.DataSource = objDR...
2
by: Joe Campbell | last post by:
I have a DBA that wrote a stored procedure that does a SELECT from a particluar SQL Server table. Within that stored procedure he links over to grab a column from another database table. I need to...
1
by: John Phelan-Cummings | last post by:
When I add the name of a new individual in a, bound form, it will not display that person’s name in a label control of a second unbound form. I have a scheduling program that I am working on. ...
1
by: rbinington | last post by:
Hi, I am trying to write a DNN module that has the ability to insert articles into an article repository. I want the users to be able to move pages around and enter text into the FCKEditor. I...
9
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo"...
5
by: pradeep84 | last post by:
Hi.. to all... in the following program i hav retrived data from the database and stored in the string s2,s3... now i hav display the following string in the textfields... i dont know how.. to do...
1
by: jalicej | last post by:
I need to display a user control inside a label. Inside this label there are many other thing also to be displayed. So i have used a table for that. The coding which i have used is : Label1.Text...
21
by: scaleautostyle | last post by:
hi everybody... i ran across the site and found TONS of information about what i want to do.... but i don't know what to take for my need. here is what i want to do... a search engine for my...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.