473,386 Members | 1,598 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,386 software developers and data experts.

Javascript files

JJ
Can you embed .js files when you compile a site into dll's? Is this option
only available when compiling controls, or is it simply not possible at all?

Many thanks,
JJ
Nov 19 '07 #1
2 1027
Hi, JJ

Yes, it's possible.

The problem is that you 'll need to refer your JS files through the
GetWebResourceUrl method of the ClientScriptManager object.

So you'll have to change every reference to the JScripts files to
something like:

<script type="text/javascript" src="<%=
ClientScriptManager.GetWebResourceUrl(this.GetType (),
"YOUR_RESOURCE_NAME.js") %>"></script>

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

On Nov 19, 9:30 am, "JJ" <a...@xyz.comwrote:
Can you embed .js files when you compile a site into dll's? Is this option
only available when compiling controls, or is it simply not possible at all?

Many thanks,
JJ
Nov 19 '07 #2
Just as an additional note, you don't *have to* use the GetWebResource
directive with an embedded resource such as a Javascript .js file. You can
still use the GetManifestResourceStream method of the Assembly class on the
GetExecutingAssembly method of Reflection, if it better suits your needs. You
can then emit the javascript into the page.
--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com

"JJ" wrote:
Can you embed .js files when you compile a site into dll's? Is this option
only available when compiling controls, or is it simply not possible at all?

Many thanks,
JJ
Nov 19 '07 #3

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

Similar topics

13
by: middletree | last post by:
I have a menu that I use on my Intranet app, and while I did try to replace it recently, I ended up going back to it. It's built entirely with javascript, and works great. However, there are...
6
by: Web Spinner | last post by:
I am running Windows 2000 and I can't seem to get my JavaScript working with ASP. I placed my HTML code in a file called x.asp under c:\Inetpub\wwwroot, and I placed my JavaScript code in a file...
2
by: Lawrence San | last post by:
I'm trying to test some simple JavaScript meant to speed up the display of my Web pages for readers using modems, but I have a fast DSL connection and I'm having trouble visualizing how effective...
3
by: ICode | last post by:
Hi, all, I am currently updating links for a site almost daily. I have set the META tags to allow for no caching so that as soon as the site is updated on the server, the new changes can be...
9
by: MStepansky | last post by:
Whats the difference between Javascript and Java3D? I mean can Javascript do like Java3D can? Or is Java3D on top of Javascript (the core, if thats what it is)? Then I should learn Javascript...
21
by: strutsng | last post by:
<input type="file"> only allows the user to browse for files. How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what...
6
by: Aaron Gray | last post by:
Hi, Is there any tool that will concatinate JavaScript files compacting them spacewise and removing comment fields ? I have some sed script that sort of does the job but was wondering if there...
6
by: Venkatesh | last post by:
Hello All, I have couple of doubts regarding the concept of on-demand javascript loading using javascript code. I could see on the net different techniques for achieving this - techniques like:...
4
by: Garg | last post by:
Hi All, Can you suggest me the a good editor fot HTML and Javascript. It will be good if that also support JSP. thanks Tarun Garg
2
by: Nathan Sokalski | last post by:
I am moving my website from my machine to my webhost, and need some help with what extra files I need to include due to the fact that I used AJAX in my site. Everything on the site is obviously...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.