hello. i need to know how i can write an onactivate function for the hyperlink that is clicked. each hyperlink identifies a different directory and i assigned each of them with an id equal to their directory. the onactivate function (actv)is meant to receive this id in a string and make a session variable out of it so the next page knows which directory is needed.
i'm attaching the code here. ive only called the function for the 1st two hyperlinks and the rest of the code is irrelevant for the problem. this code gives a lot of errors. PLEASE HELP ME ASAP!
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ALU.aspx.cs" Inherits="ALU" MasterPageFile="~/mp.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="Style.css" type="text/css" rel="stylesheet">
<script src="JScript.js" type="text/javascript"></script>
<span class="preload1"></span>
<span class="preload2"></span>
<script language="C#" runat="Server">
void actv(object Sender,EventArgs E)
{
string dir_id=((HyperLink)Sender).ID;
//string dir_id= @"C:\Users\Hifza Javaid\Desktop\al-futtaim";
Session["dir"] = dir_id;
TextBox1.Text = dir_id;
}
}
</script>
<%if(!Page.IsPostBack)
{
%>
<ul id="nav">
<li class="top"><a class="top_link"><span class="down">ALU-VOICE</span></a>
<ul class="sub">
<li>
<a class="fly">ALU-OXO</a>
<ul>
<li><a href="next0.aspx" id="Files\fol1" onactivate="actv">PRODUCT BROCHURES</a></li>
<li><a href="next0.aspx" id="Files" onactivate="actv">PRODUCT FEATURES</a></li>
<li><a href="next0.aspx" >PRODUCT COMPARISON</a></li>
<li><a href="next0.aspx" >DETAILED RFP</a></li>
<li><a href="next0.aspx" >OTHERS</a></li>
</ul>
<li><a class="fly">ALU-OXE</a>
<ul>
<li><a href="next0.aspx">PRODUCT BROCHURES</a></li>
<li><a href="next0.aspx">PRODUCT FEATURES</a></li>
<li><a href="next0.aspx">PRODUCT COMPARISON</a></li>
<li><a href="next0.aspx">DETAILED RFP</a></li>
<li><a href="next0.aspx">OTHERS</a></li>
</ul>
</li>
</ul>
</li>
<li class="top"><a class="top_link"><span class="down">ALU-DATA</span></a>
<ul class="sub">
<li><a href="next0.aspx">PRODUCT BROCHURES</a></li>
<li><a href="next0.aspx">PRODUCT FEATURES</a></li>
<li><a href="next0.aspx">PRODUCT COMPARISON</a></li>
<li><a href="next0.aspx">DETAILED RFP</a></li>
<li><a href="next0.aspx">OTHERS</a></li>
</ul>
</li>
<li class="top"><a class="top_link"><span class="down">HP-SERVER</span></a>
<ul class="sub">
<li><a href="next0.aspx">PRODUCT BROCHURES</a></li>
<li><a href="next0.aspx">PRODUCT FEATURES</a></li>
<li><a href="next0.aspx">PRODUCT COMPARISON</a></li>
<li><a href="next0.aspx">DETAILED RFP</a></li>
<li><a href="next0.aspx">OTHERS</a></li>
</ul>
</li>
<li class="top"><a class="top_link"><span class="down_">FN-NETWORK
SECURITY</span></a>
<ul class="sub">
<li><a href="next0.aspx">PRODUCT BROCHURES</a></li>
<li><a href="next0.aspx">PRODUCT FEATURES</a></li>
<li><a href="next0.aspx">PRODUCT COMPARISON</a></li>
<li><a href="next0.aspx">DETAILED RFP</a></li>
<li><a href="next0.aspx">OTHERS</a></li>
</ul>
</li>
</ul>
<%}%>
<br />
<br />
<br />
<asp:TextBox ID="TextBox1" runat="server" ontextchanged="TextBox1_TextChanged"></asp:TextBox>
<br />
<br />
<br />
<br />
<span class="style12"> </span><span class="style11"> </span><b>
<span class="style11">PARTNERS</span><br class="style11" />
<br class="style11" />
</b>
<asp:Image ID="Image5" runat="server" Height="75px" ImageUrl="~/p1.jpg"
style="margin-top: 0px" Width="104px" />
<asp:Image ID="Image6" runat="server" Height="63px" ImageUrl="~/p2.png"
Width="94px" />
<asp:Image ID="Image7" runat="server" Height="59px" ImageUrl="~/p3.jpg"
Width="132px" />
<asp:Image ID="Image8" runat="server" Height="47px" ImageUrl="~/p4.jpg"
Width="157px" />
<asp:Image ID="Image9" runat="server" Height="58px" ImageUrl="~/p5.jpg"
style="margin-right: 1px" Width="121px" />
<asp:Image ID="Image10" runat="server" Height="76px" ImageUrl="~/p6.jpg"
Width="128px" />
</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="head">
<style type="text/css">
.style11
{
color: #3366FF;
font-family: Calibri;
}
.style12
{
font-family: Calibri;
}
</style>
</asp:Content>