javascript and asp.net

M

Mel

Is there a way to use the same javascript code for 2 pages? For
maintenance reasons, if I make a fix or a change I will need to
remember do it for both pages. Is there any way to get around this?
For example, I have one calculator but when I click a link on one page
it is just displayed as a popup window and on another page it is
displayed as a full page (using master page and content).

(Using Asp.net 2.0, javascript, Visual Basic.net, Win XP Pro)
 
M

Mike

Create a js file. Put your javascript in that file and then just include it
on your pages.

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

Mel

Create a js file. Put your javascript in that file and then just include it
on your pages.

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

Thank you, I'll give it a whirl.
 
B

Braulio Diez

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top