I have created an *acsx file for my navigation. In it there is some logic for the log in button. In the old asp version I checked a session variable to see if user was logged in and if so to replace the log-in button with a log-out button. I am having problem trying to do the same in the asp.net version. Below is the navigation.acsx page.
You will notice that there are no
tags around the imagebutton tag. When I do add it, it crashes and tells me that I cannot have two
tags. naturally, I am importing the navigation.acsx page to the main page and it already has a
tag within it.
So, How do I get this code to work on the navigation page?
Any help would be appriciated!!
########### Navigation.acsx #############
Mike Diaz...
You will notice that there are no
Code:
<Form runat="server">
Code:
<form>
Code:
<form.
So, How do I get this code to work on the navigation page?
Any help would be appriciated!!
########### Navigation.acsx #############
Code:
<%@ Control %>
<script runat="server">
Sub Page_Load
If Session( "logged" ) = "" Then
imgLogin.ImageURL = "/EStation/Graphics/logoff.gif"
Else
imgLogin.ImageURL = "/EStation/Graphics/login.gif"
End If
End Sub
Sub Log_click(Sender As Object, E As ImageClickEventArgs )
If Session( "logged" ) = "" Then
Response.redirect ( "/EStation/pages/login.asp" )
Else
Response.redirect ( "/EStation/pages/logoff.asp" )
End If
End Sub
</script>
<p>
<a href="/index.asp"><img height="30" alt="Back to home page" src="/EStation/Graphics/Home.gif" width="125" border="0" /></a>
</p>
<p>
<asp:Imagebutton id="imgLogin" runat="server"
AlternateText="Log On"
ImageUrl="/EStation/Graphics/Home.gif"
onclick= "Log_click"/>
</P>
<p>
<a href="/EStation/Pages/Apparatus.asp"><img height="30" alt="Apparatus status, repairs, maintanance" src="/EStation/Graphics/Apparatus.gif" width="125" border="0" /></a>
</p>
<p>
<a href="/EStation/EMS/ems.asp"><img height="30" alt="" src="/EStation/Graphics/EMS.gif" width="125" border="0" /></a>
</p>
<p>
<a href="/EStation/Supplies/supplies.asp"><img height="30" alt="" src="/EStation/Graphics/Supplies.gif" width="125" border="0" /></a>
</p>
Mike Diaz...