Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP ASP.NET HTML HTML5
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.
 
Regards,
AP
Posted 9-Jun-12 22:55pm
Edited 9-Jun-12 23:39pm
v2
Rate this: bad
good
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.
  Permalink  
v2
Comments
Arunprasath Natarajan at 10-Jun-12 5:36am
   
You did not get me.. I just display and hide the msg.
Sandeep Mewara at 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.
Arunprasath Natarajan at 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 at 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.
Sandeep Mewara at 10-Jun-12 5:41am
   
My 5!
 
Whoever voted 1 did not understood question or the answer.
shivprasadshetty at 10-Jun-12 6:42am
   
Tnx sandeep for clarifying with arunprasath.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  

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

  Print Answers RSS
0 OriginalGriff 385
1 Gihan Liyanage 308
2 Sergey Alexandrovich Kryukov 150
3 syed shanu 125
4 ChauhanAjay 120
0 Sergey Alexandrovich Kryukov 9,021
1 OriginalGriff 7,941
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 10 Jun 2012
Copyright © CodeProject, 1999-2014
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