Solved

javascript in asp.net web project

Posted on 2011-03-18
1
386 Views
Last Modified: 2013-12-06
I have created a new asp.net web project.  I have serveral .html files that need to reference and call functions in a common javascript file.  I am using a master page for the site at the root level.  

In the old web site, the "master page" was a frames page that included the common.js file and all child web pages called functions by using top.appData.theFunction() (appData is an object defined in the common.js file).  

I would like to keep this functionality, since I really don't want to turn all of these html pages into .aspx pages if I don't have to.  

Any help appreciated.
0
Comment
Question by:dhenderson12
1 Comment
 
LVL 7

Accepted Solution

by:
foobarr earned 500 total points
ID: 35165962
Well if you are using a master page you will need to include a contentplaceholder.  So you will need to create those html pages into aspx pages so that you can use that contentplaceholder control.  As long as you include that js file in your master page, whatever pages that include that master page will have access to its functions

0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
As a financial services provider, your business is impacted by two of the strictest federal regulations on record: the Sarbanes-Oxley Act and the Gramm-Leach-Bliley Act. Correctly implementing faxing into your organization to provide secure, real-ti…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question