Solved

Want to clear session variable on hyperlink click

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

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…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now