|
Can this be managed using cookies? Coz the sites like gmail uses cookies to handle login and once you logout they wont allow you to login again.
Am I thinking right?
Any suggestion?
Regards
Vijay V.
Yash Softech
|
|
|
|
|
There is no permanent solution available.
|
|
|
|
|
VijayVishwakarma wrote: Is there any solution for this ?
No reliable solutions are available.
When you press back button, browser loads the previous page from it's cache. It won't request for that page again.
Some JS can forward the page when back button is pressed, but again it is not reliable as JS can be turned off. If you are very much concerned about users viewing the page, I suggest to use popup window for displaying all your secure pages. Once user logs out, close that popup. Also ensure that your webpages are not accessible when user has turned off JS.
|
|
|
|
|
Check this article out:
BackButton
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
There are many alternatives to it not the exact solution
1. When User clicks log out button close the browser after resetting the session.
2. After logged out also when user clicks back browser button then you could see the last page visited when user was logged in
But this page comes from Cache no server side request has sent
So no worry if you are checking user credentials in every page
he won't be able to do any thing
I think just remove Cache ok even if he refresh the Page then he should redirect to default log in Page
Hope i am able to explain it
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Put this in your Page Load event :
Response.Expires = 0;
Response.ExpiresAbsolute = DateTime.Now;
|
|
|
|
|
Apologies to bother you but can you please brief me where? On which page?
Regards
Vijay V.
Yash Softech
|
|
|
|
|
You can place it on all the pages you are using in the Page Load event. (probably could to this in the HttpModule)
protected void Page_Load(object sender, EventArgs e)
{
Response.Expires = 0;
Response.ExpiresAbsolute = DateTime.Now;
if (Session["User"] != null)
{
//some other code...
}
else
{
//Redirect to Login Page
}
}
The on the Logout button if the Sessions are "Abandoned" and the user tries navigating Back to this page he will be re-directed (asked for login credentials)...
Hope this helps
|
|
|
|
|
thanks for the reply.
But this too is not working.
I have added the code in the page load and on logout have used Session.Abandon(). After logout I tried back button its again in.
Only IE is not allowing the user to go back in but other browsers like Mozilla, Opera are allowing to go back in however I cannot do anything but I dont want user to go in after loggin out.
Vijay V.
Yash Softech
|
|
|
|
|
One thing I noticed that page load is not called when User presses the back button.So this means the page load is not called when a browsers back button is pressed.
And thus the code to check Session value is not called and the user is in.
May be I have to use the Session code on any other page function.
Can anyone suggest me on this?
Regards
Vijay V.
Yash Softech
|
|
|
|
|
I noticed that too.. Mozilla is a strange animal
What I found that could possibly work is to add javascript function on the document Onload event...
onload="CheckSessions()"
then through your javascript function click some hidden server button to re check the sessions (this will cause a Postback).
function CheckSessions()
{
document.getElementById("btnCheck").click();
}
This is a bit of a hack but it works... javascript fires even after navigating back...
PS: I noticed that the navigating doesnt call the Page_Load or Page_Init
|
|
|
|
|
ooops that will go into an infinite loop
|
|
|
|
|
I think making Session.Abandon and checking for some session value from the Application.BiginRequest event will do the purpose. Check if session exists, or otherwise redirect to login screen...
Abhishek Sur
|
|
|
|
|
This lead to an infinite loop.
Regards
Vijay V.
Yash Softech
|
|
|
|
|
this is not working for me.
Can you suggest any other alternate?
IE works fine I have problem with other browsers.
I am using cookies to maintain login.
Regards
Vijay V.
Yash Softech
|
|
|
|
|
Hi,
I have created a Webpage, and on the click of a certain link i want to run a unicast stream from VLC giving an output of RTSP.
Please help.
Regards
|
|
|
|
|
Hi all
I have a problem in processing Semicolon <;> seperated CSV file
Web server Locale "en-US"
CSV file Locale "de-DE"
i will not be able to use "Microsoft text driver"
Is there any known solution????
Thanks & Regards
Pete
|
|
|
|
|
Can't you just open the file, read it line by line and use the Split function to get the values?
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
I need to query the CSV file...
there can be semicolons in the content also, so split will not help...
i need to execute SQL Queries on the file using ADO..
Thanks & Regards
Pete
|
|
|
|
|
Good luck, bro.
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
As per I know, if comma is there in your data you must write like
"data1,data2" inside your CSV file, so that it takes it as single data.
Abhishek Sur
|
|
|
|
|
|
If you want to add a confirmation dialog after a user presses a certain button, add an onclick attribute to the button with a confirm statement
btn.Attributes.Add("onclick", "return confirm('Ey, are you sure?')");
Works fine!
|
|
|
|
|
Thanks for the response...well see the thing is that's not the only thing I'm doing in the button's click event handler. In other words, I have code written in the code behind button1_click() event handler. So having said that, can I just use this in addition to the code that is written in the code behind as well??
Also, If I were to do this, how would I do lets say some other processing when the user clicks Yes or OK. Would that code be in the same event handler or should I do that in the Page_load()?
Thanks
|
|
|
|
|
Nope, the code I provided is client side, when the user clicks the button, a confirmation message will appear. If the user confirms that message, your code-behind event handler will be triggered (in other words, the button1_click code runs) of the user does not confirm the javascript confirmation message, no postback will take place (e.g. no code will run server-side).
You can however modify the script so that you CAN run different code on the server if you want (need) to.
|
|
|
|