javascript and asp.net

  • Thread starter Thread starter Mel
  • Start date Start date
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)
 
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"/>
 
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.
 
Back
Top