Wednesday, March 28, 2012

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="http://pics.10026.com/?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

AndreOn 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="http://pics.10026.com/?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>
?
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="http://pics.10026.com/?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
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="http://pics.10026.com/?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>
> ?

0 comments:

Post a Comment