I have an ASP page which has this script at the top of the page:
<% if session("username") = "" then
Which means the page needs a value in the session variable "username" else it would redirect to the "notification.asp" page. This works perfectly when I click on hyperlinks that points to the above page. But if I click on a button instead of a hyperlink then the session does not work. Any idea why?
Code for Button:
<input type="button" value="Back To Home" OnClick="location.href='add-contact.asp';">