0

Is it possible to use next exsample?

In A.asp of [A server], to use runat="server" src="[B server]/js/script.js"

I would like to use javascript imported from other server in asp code

Suby Lee
  • 415
  • 1
  • 4
  • 6
  • javascript loaded in a script tag can come from anywhere, don't use `runat` on a script tag - oh, wait, you want to use javascript on the server side?? What is the server side language, if it's not javascript you're SOOL – Jaromanda X Nov 16 '15 at 03:47
  • what you are trying to ask doesn't really make any sense. – Claies Nov 16 '15 at 03:52
  • Wait a minute, are you trying to do what nodejs does? may be? – Gogol Nov 16 '15 at 04:36
  • I want to use common js files of another server in asp code. – Suby Lee Nov 16 '15 at 04:39

1 Answers1

0

runat="server" converts the asp part to standard HTML and then sends it across to the browser. So that is not something you can do. But if you want to use javascript from a different server, look into CORS

Saransh Kataria
  • 1,447
  • 12
  • 19