![]() |
|
|
|||||||
![]() |
ASP Net - JavaScript problem used in Master Pages and Subfolders |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hello, I was wondering if anybody know how to fix the problem with JavaScript in subfolders. I have the following in <body> <script type='text/javascript' src='Javascripts/var.js' language="javascript"></script> ...... </body> This works if the pages are in the main root folder. Once I create a subfolder I can no longer see javascript menu. I would like to be able to place several files into the subfolders to keep the project clean but not able to do this until I fix the problem with JavaScript. I'm using a Master page in the project. Any suggestions? I tried src='~/Javascripts/var.js' this doesn't work and if I make it a server control the language fails since te defind language is C#. Thank you, Tatyana Tatyana |
|
|
|
|
#2 |
|
Posts: n/a
|
Hi Tatyana,
There's a proposed solution for that here: http://geekswithblogs.net/jbentley/a.../31/58600.aspx Ken Microsoft MVP [ASP.NET] "Tatyana" <> wrote in message news:... > > > Hello, > > > > I was wondering if anybody know how to fix the problem with JavaScript in > subfolders. > > I have the following in > > <body> > > <script type='text/javascript' src='Javascripts/var.js' > language="javascript"></script> > > ..... > > </body> > > This works if the pages are in the main root folder. Once I create a > subfolder I can no longer see javascript menu. > > I would like to be able to place several files into the subfolders to keep > the project clean but not able to do this until I fix the problem with > JavaScript. > > I'm using a Master page in the project. > > Any suggestions? I tried src='~/Javascripts/var.js' this doesn't work and > if > I make it a server control the language fails since te defind language is > C#. > > Thank you, > > Tatyana > > > > |
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2006
Posts: 1
|
Try this solution. I use it all the time.
Including Javascript files no matter where you are - http://extraview.co.uk/blog/PermaLin...2af0afc89.aspx |
|
|
|
|
|
#4 |
|
Posts: n/a
|
Here is, IMHO, a fine solution: Including Javascript files no matter where you are - http://extraview.co.uk/blog/PermaLin...2af0afc89.aspx Tatyana wrote: > Hello, > > > > I was wondering if anybody know how to fix the problem with JavaScript in > subfolders. > > I have the following in > > <body> > > <script type='text/javascript' src='Javascripts/var.js' > language="javascript"></script> > > ..... > > </body> > > This works if the pages are in the main root folder. Once I create a > subfolder I can no longer see javascript menu. > > I would like to be able to place several files into the subfolders to keep > the project clean but not able to do this until I fix the problem with > JavaScript. > > I'm using a Master page in the project. > > Any suggestions? I tried src='~/Javascripts/var.js' this doesn't work and if > I make it a server control the language fails since te defind language is > C#. > > Thank you, > > Tatyana |
|