Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a Javascript file
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01112745
Message ID:
01113187
Vues:
14
You can put the call into the page just as you have, or you can attach it with Page.ClientScript.RegisterClientScriptInclude().

Instead of using a hard path as you have consider using Page.ResolveUrl() and using ~ syntax to (~/scripts/MyJs.js) instead to make the url independent of the location your at in your application.

+++ Rick ---



>Hi,
>
>I have an html page which calls several Java script .js files to put standard header, footer ang left menus on each page.
>
>I am re-writing one of these pages to aspx and have no idea what to do with the call on .js files.
>
>For example, I have code like this in my .htm file :
>
>
><SCRIPT language="JavaScript" src="../JScript/js_topmenu_template.js"></SCRIPT>
>
>
>I kept the code in the same way in my asp.net(c#) page. But it doesn't show the top menu.
>
>Could somebody please help me how to fix this.
>
>Smitha
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform