Solved

Want to clear session variable on hyperlink click

Posted on 2008-10-27
3
922 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

831 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