Click here to Skip to main content
15,899,935 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi to all,

Here i want to refresh second page when click event occur in first page.

For eg.

If i open second page and in another machine somebody fire click event in first page.just i want to refresh my second page. and another one i just want to refresh only not to redirect first to second page.while refreshing.
Posted
Updated 27-May-15 22:04pm
v3
Comments
Abhipal Singh 28-May-15 3:31am    
Too much confusion. Can you please explain your problem a bit more clearly?

what does this line mean? "and another one not to change first as second page.while refreshing. "
JOTHI KUMAR Member 10918227 28-May-15 3:33am    
now i improve my auestion

1. put ajax script panel, update panel, ajax timer on second page.

2. write your function and call on timer.

3. create a web service for sharing data between these pages.

4. when you click on button of first page then data will be transfer to web service and ajax timer of second page call the web service and display first page activity information.

5. this is just to share an object between multiple pages.

6. It can be done using Application variable in behalf of web service.
 
Share this answer
 
Comments
JOTHI KUMAR Member 10918227 28-May-15 9:41am    
im fresher to asp.net c#. so kindly explain me by example
Firstly you will have to record the change your second webpage has done. You can also set a flag indicating the change.
In your first web page, you will have to poll the web server to check for any changes in the second page. Basically just check the flag. If there are changes, get the changed values (JSON name-value pair would be great) and update your second page.

That's a very naive implementation I told you considering your question. For more complex scenarios, I would recommend taking a look at ASP.NET SignalR[^].

If you also want to know how Facebook, Gmail etc do it. Read this post - How does facebook, gmail send the real time notification?[^]

Hope that gets you started on a right path!
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900