How to include a client script resource file?

Hi,
I have created an project that defines some custom webcontrols.
Some of them rely on client script functions which I have to send to the
client.
I'd like to know if there is some way of putting them as resource files in
the project so that they will be included in the complied assemby. My goal
is that I will have a file in my project which inlcudes the client script so
that I can alter the file and then read the contents and output its contents
when my controls render, thus not having to put togehter the client sciprt
in my code and not having to deliver a separate file <clientscript.js> which
the user of my control has to put on their server.

Take a look at the EmbeddedJScript class and the example code that uses it.
I basically render the jscript as dynamically rendered content, but you can
also use the class to just load it from a resource and render the script
text manually to the page if you choose.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
"mortb" <mortb1<noospam<@hotmail.com> wrote in message
news:...
> Hi,
> I have created an project that defines some custom webcontrols.
> Some of them rely on client script functions which I have to send to the
> client.
> I'd like to know if there is some way of putting them as resource files in
> the project so that they will be included in the complied assemby. My goal
> is that I will have a file in my project which inlcudes the client script
so
> that I can alter the file and then read the contents and output its
contents
> when my controls render, thus not having to put togehter the client sciprt
> in my code and not having to deliver a separate file <clientscript.js>
which
> the user of my control has to put on their server.
>
> Help appreciated,
> mortb
>
>

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!