Board Logo

dotNet User Control
wayneh - 2/13/2007 at 04:21 AM

I would like to if the js files need to be located in the root. I want to create a user control in my dotNet project. The problem I am currently experiencing is that I have folder structures for ease of use. So the problem is that I have created a folder called UserControls and added a WebMenu.ascx page within the folder. I then copied all the js files to this folder structure, created a css folder under the UserControls folder and copied the css file to this folder. The HTML code in my user control looks as follows:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebMenu.ascx.cs" Inherits="UserControls_WebMenu" %>
<%@ Register Assembly="SuperControls.WebMenu" Namespace="SuperControls" TagPrefix="cc1" %>
<!--All the relevant files are located in the root directory-->
<!--Need to include this file for menu style-->
<link href="css/menu.css" type="text/css" rel="stylesheet" />
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu.js" type="text/javascript"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu_tpl.js" type="text/javascript"></script>
<cc1:WebMenu ID="WebMenu1" runat="server" Width="100%" />

When I drag the user control onto my various web pages which are situated with various file structures the menu does not display.

Thanks in advance

Back to forum: