Solved

Want to clear session variable on hyperlink click

Posted on 2008-10-27
3
930 Views
Last Modified: 2008-10-30
I have a HyperLink on a Master Page. When the user click on it, he is directed to the Home Page. I want to write this code:

Session["DecryptedKey"] = "";

when the user clicks the HyperLink. But I noticed that a Click event is not available for the HyperLink. How to write the above line and where?
0
Comment
Question by:rpkhare
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Accepted Solution

by:
ASPSQLServerCOM earned 25 total points
ID: 22815782
could it be possible to write
Session["DecryptedKey"] = "";
on Home Page load

or
http://forums.asp.net/t/1140362.aspx
0
 
LVL 8

Author Comment

by:rpkhare
ID: 22815839
It is possible, but if it gets cleared on HyperLink Click then better.
0
 
LVL 20

Assisted Solution

by:brwwiggins
brwwiggins earned 25 total points
ID: 22817079
You can't change the control to a linkbutton?
Otherwise you might have to hyperlink to a page that executes the code then redirects to default
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question