Problem with asp.net

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
gardar
Beginner
Beginner
Posts: 1
Joined: Thu Jul 31, 2003 1:16 pm
Location: Iceland
Contact:

Problem with asp.net

Post by gardar »

Hi all
I am trying to install the menu to asp.net page but nothing seems to work. I dont get any error message. I there some one who had similiar problem and knows the answer please help.

I am using UserControl to display the menu

<%@ Control Language="vb" AutoEventWireup="false" Codebehind="tenglar.ascx.vb" Inherits="frank_v3.tenglar" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<script language="javascript" src="mmenu.js"></script>
<script language="javascript" src="menu_array.js"></script>

best regards
gkob
Beginner
Beginner
Posts: 1
Joined: Fri Aug 01, 2003 7:09 am

Probably a path problem

Post by gkob »

Hi Gardar,

This is working for me:

Code: Select all

<%@ Control Language="c#" AutoEventWireup="false" Codebehind="Header.ascx.cs" Inherits="FinalProject.Controls.Header" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<P>This is a header</P>
<P>
<SCRIPT language=JavaScript src="Menu/menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="Menu/mmenu.js" type=text/javascript></SCRIPT>
</P>
<HR width="100%" SIZE="1">
I would guess that the paths to the javascript files are not right. I think the path is usually (but not always) relative to the .aspx file which includes the controls. Request.ApplicationPath should also get you to the root.

Let me know if this fixes it,

gkob
Post Reply