Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Dear All,
please help me in in following scenario
1.I have open multiple tab says http://localhost:8450/Login.aspx[^] in FireFox

Now, i want to know how many tabs open in same Browser with same URL.

Please help me on this ,

I have tried with

DdeClient dde = new DdeClient("Firefox", "WWW_GetWindowInfo");
dde.Connect();
string url = dde.Request("URL", int.MaxValue);
dde.Disconnect();

But url always getting "About Bank"
Posted
Comments
Thanks7872 7-Jul-15 9:19am    
What will you do then?
Mukesh Ghosh 7-Jul-15 9:41am    
My objective is,
when multiple tab (More than one) with same url in same browser is opened, i will clear my session in code behind.

1 solution

In codebehind? Is this an ASP.NET app you're putting this code into?

If so, you cannot do what you're attempting. The server will not have permissions to the client browser at all and will not be able to "connect" to it to get the number of open tabs.

You really have no method of finding this information from the server.
 
Share this answer
 
Comments
Mukesh Ghosh 7-Jul-15 9:55am    
Yes it is in asp.net.

Is there any other way to do that like J Query, AJax etc?
Dave Kreskowiak 7-Jul-15 10:59am    
No. Code running in the browser cannot get at other tabs in the browser.
Sergey Alexandrovich Kryukov 7-Jul-15 11:45am    
5ed. The inquirer needs to get to understanding what Web really does. At this moment, he does not have a clue.
—SA

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