Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript VB.NET
hii

i am making a web application in which i amke seesion of id but it did not prevent to open same page using copy or paste the url in new window or tab. how it is possible plz any one tell me
 
thank you in advance
Posted 22-Apr-13 23:36pm
Comments
Aman.A at 23-Apr-13 4:47am
   
Can you please improve your question a bit? if you are using session for authentication and opening the authenticated page in a different tab of the same browser, then this is the expected behavior as the session cookie still exists on the computer for that browser and is valid. Try using a different browser to open the copy and pasted url and see if that opens up.
supriya931 at 23-Apr-13 5:10am
   
no there is no authenicated page i am just using a trans id to count transaction through that page and i amke the seesion of trans id till the last page but it open when i copy the url of that page and inserted the valuein database from the copy url page
Aman.A at 23-Apr-13 5:46am
   
can you explain what exactly you are trying to achieve (perhaps add some code to your question)? may be using session for that isn't such a good idea?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Create a page named it "ErrorPage.aspx" and give message in page.
Now, in your current page Use below code:
 
protected void Page_Load(object sender, EventArgs e)
   {
       if (!IsPostBack)
       {
           if (Session["TransIDId"] == null)
           {
               Response.Redirect("ErrorPage.aspx");
           }
       }
   }
  Permalink  
Comments
supriya931 at 23-Apr-13 6:40am
   
i am want that no one can open a same page by copy the url of that page simple ho w it is possible
supriya931 at 23-Apr-13 6:42am
   
sorry sant osha it is not working
Sant Osha at 23-Apr-13 6:43am
   
its not possible... because code doesn't understand in which tab or window its working

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

  Print Answers RSS
0 OriginalGriff 6,045
1 DamithSL 4,611
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 23 Apr 2013
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