?
Solved

Want to clear session variable on hyperlink click

Posted on 2008-10-27
3
Medium Priority
?
938 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 75 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 75 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.
Suggested Courses

621 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