PC Review


Reply
Thread Tools Rate Thread

how to add javascript menu.js to usercontrol .ascx

 
 
AboutJAV@gmail.com
Guest
Posts: n/a
 
      15th Mar 2008
Hi,

I created a navigation menu.js in javascript. It works with .htm
files, however, I can't get it to work in my .master or .ascx file.

I added the following after the <body> tag in the master file.

<script type="text/javascript">var MenuLinkedBy="AllWebMenus
[4]",awmMenuName="topmenu",awmBN="706";awmAltUrl="";</script>
<script src="/JavaScript/topmenu.js" type="text/javascript"></script>
<script type="text/javascript">awmBuildMenu();</script>

When I run the website in debug mode, I do not see the page which uses
my master file.

I thought about adding it to my ascx header control, which occupies my
top portion of the master file.

When I added the 3 script lines to the follow usecontrol ascx file, I
still can't get it to work. Any help is greatly appreaciated.


<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="Header.ascx.cs" Inherits="UserControls_Header" %>
<p align="center">
&nbsp;</p>
<p>

<asp:Table ID="Table1" runat="server" Width="721px"
BorderStyle="None" Height="34px">
<asp:TableRow runat="server">
<asp:TableCell runat="server">
<asp:ImageMap ID="ImageMap2" runat="server" Height="101px"
ImageUrl="~/Images/SiteLogo3.jpg"
Width="141px">
</asp:ImageMap>


</asp:TableCell>

<asp:TableCell runat="server">
<asp:TextBox ID="srchTextBox" runat="server">Search</
asp:TextBox>

</asp:TableCell>
<asp:TableCell runat="server">

<asp:Button ID="goButton" runat="server"
OnClick="goButton_Click" Text="Go" />
</asp:TableCell>

</asp:TableRow>
</asp:Table>
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;
</p>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a UserControl.ascx File Greg Microsoft ASP .NET 1 27th Oct 2009 09:04 PM
UserControl (ascx) - Using Javsscript =?Utf-8?B?Qw==?= Microsoft ASP .NET 1 24th Apr 2007 06:18 PM
referencing an anchor from within a usercontrol (ascx) gary Microsoft ASP .NET 3 21st Dec 2005 08:31 AM
v2 - GridView - UserControl .ascx - Problem Alexander Widera Microsoft ASP .NET 4 14th Dec 2005 10:28 AM
Determining the type of a UserControl (ascx) in code =?Utf-8?B?VHJldm9yIEFuZHJldw==?= Microsoft ASP .NET 2 27th Jun 2005 04:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:52 PM.