Click here to Skip to main content
13,004,215 members (75,775 online)
Rate this:
Please Sign up or sign in to vote.
Dear Friends,

If I a complete website where 10 webpages linked in it.
But when ever new data updated, I need to display a alert or small pop-up as "One New Data Updated." even if user is in any pages in the website.
Eg: Any page you use in Face Book, If any one like your post, you will be getting a small alert.

Posted 9-Jun-12 22:55pm
Updated 9-Jun-12 23:39pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you can either use response.redirect("<script>alert('Your text goes here')</script>")

Or you can use RegisterClientScriptBlock("key","<script>alert('Your text goes here')</script>")

both are equal but sometimes response.redirect changes the way the page is rendered on clicking ok.
I would suggest the second option.

you could also use conirm instead of alert.this would give the user the option to click (ok and cancel)
Depending on which you could perform further action like clicking on ok you might like to redirect to the updated page like it happens on facebook notification.
Arunprasath Natarajan 10-Jun-12 5:36am
You did not get me.. I just display and hide the msg.
Sandeep Mewara 10-Jun-12 5:41am
He told exactly what you asked for. It's a different matter that you wanted to ask something else!

Nowhere did you mention that there is a label message that needs to be shown on need.
Sandeep Mewara 10-Jun-12 5:41am
My 5!

Whoever voted 1 did not understood question or the answer.
Arunprasath Natarajan 10-Jun-12 5:58am
Yeah I agree, But it should not disturb user web page.. Its just display to 5 sec and hide.
Sandeep Mewara 10-Jun-12 6:29am
I am not disagreeing with your requirement. All I am pointing is, answer replies what question was asked. Posting further clarity/update of requirements via comments does not help much.
shivprasadshetty 10-Jun-12 6:42am
Tnx sandeep for clarifying with arunprasath.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170627.1 | Last Updated 10 Jun 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100