Click here to Skip to main content
15,918,275 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

What is the best way to get the urls of all currently opened pages in an ASP.Net application. In a page, I want to implement a functionality where if the exact same url with querystring is already opened by some other user then I want to notify the second user that user xyz is already working on this product. What is the best way to implement this?
Posted

In case you have to keep that URL in Database & delete that URL from Data Base once user move from that page.
 
Share this answer
 
Comments
drkilljoy 12-Aug-13 2:26am    
What if I maintain an Application level List<int,string> containing all the opened urls along with the userids. When a user moves to another page or close the webpage I can remove it from the list.
Mukesh Ghosh 12-Aug-13 3:06am    
Yes that also work, problem is if you reset webconfig. then all value might gone.
whatever i understand is that you have user login functionality so my way is

in datatabase >>

SQL
userid   loggedin current_page_open 
  1         yes       index.aspx


and when user 1 open about_us page then index page will be updated to the

SQL
userid   loggedin current_page_open 
  1         yes       about_us.aspx


now if 2 no user is logged in then u can check that

which current page is opened by any user so you can fire alert if page is in use

suppose user 2 request for index then

SQL
select * from table where current_page_open="index.aspx" and loggedin='yes'


so if you get row then fire alert else open page

regards...:)
 
Share this answer
 

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