473,379 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Web.config javascript

Hi,

Can I add javascript path to a web.config file?

Right now I have to add this to each page.

<script src="AC_RunActiveContent.js" type="text/javascript"></script>

If so, can someone give me an example? Do I need to add anything to the
page if I can add this to the config file?

Thanks

Andre

May 3 '06 #1
3 2183
On Wed, 3 May 2006 13:29:02 -0700, André wrote:
Hi,

Can I add javascript path to a web.config file?
Not without also changing all the web pages to include this configuration
entry, which sort of defeats the purpose.
Right now I have to add this to each page.

<script src="AC_RunActiveContent.js" type="text/javascript"></script>

If so, can someone give me an example? Do I need to add anything to the
page if I can add this to the config file?


Why not juse use project search and replace to replace </head> with
<script...</script></head>
?
May 3 '06 #2
Yes, you can store any string you want in your web.config (usually in the
appSettings section). But you'll need to render your <script src=.... from
the server side code.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"André" wrote:
Hi,

Can I add javascript path to a web.config file?

Right now I have to add this to each page.

<script src="AC_RunActiveContent.js" type="text/javascript"></script>

If so, can someone give me an example? Do I need to add anything to the
page if I can add this to the config file?

Thanks

Andre

May 3 '06 #3
Thanks, I have a class where I call my flash anyway, i can add it to there.
I just wanted to do it in web.config. Thanks to the new IE patch, my flash
will not activate unless I add more javascript.

Thanks again.

"Erik Funkenbusch" wrote:
On Wed, 3 May 2006 13:29:02 -0700, André wrote:
Hi,

Can I add javascript path to a web.config file?


Not without also changing all the web pages to include this configuration
entry, which sort of defeats the purpose.
Right now I have to add this to each page.

<script src="AC_RunActiveContent.js" type="text/javascript"></script>

If so, can someone give me an example? Do I need to add anything to the
page if I can add this to the config file?


Why not juse use project search and replace to replace </head> with
<script...</script></head>
?

May 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Laurent Bertin | last post by:
Hi i got a strange problem but it's true i don't make thing like anyone... First Config: + IIS5.0 SP2 (yes i know...) WebSite Security Root : Digest Authentication, NT Authenticated SubFolders...
0
by: James Martin | last post by:
With the .NET Framework version 1.1, the following web.config code causes all of the html/aspx relative path references to fail: <sessionState mode="InProc" cookieless="true" timeout="20"/> ...
11
by: Patrick | last post by:
I have an ASP.NET application that connects to a SQL Server database. The SQL Server resides on a seperate development server from the IIS5.1 on Windows XP SP2 on development PCs which host the...
2
by: Carlos | last post by:
Hi all, I need some settings that I have created in my machine.config of my test enironment to be available in the deployment environment. I do not have control over that environment, and was...
1
by: Jonas | last post by:
Hi, I've recently found out that I'm supposed to set the debug attribute of the compilation element in web.config to false in production environments. But when I do so in my ASP.NET application,...
3
by: Lonifasiko | last post by:
I'm developing a Winforms application that reads some variable values from a .config file(similar to XML file). Besides, I need to format the value I read from the config file. I do it this way: ...
4
by: yancheng.cheok | last post by:
Hello all, I have a web application, which I had developed few years ago with ASP .NET 1.1 Today, I would like to deploy the web application to client, using ASP .NET 2.0 + UltiDev Cassini...
3
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= | last post by:
I have a web application that I started building. I created a master page with some javascript in the head: <script src="<%# Request.ApplicationPath%>/Scripts/Main.js"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.