Connecting Tech Pros Worldwide Forums | Help | Site Map

How to set path to the WebForm JavaScript file

Mike
Guest
 
Posts: n/a
#1: Oct 27 '07
I need to load the WebForm JavaScript from my own location instead of the
resource URL ( http://localhost/WebResource.axd?
d=4vyf787asdY8c9h_cvayUuA2&t=63323639524538200 0).

Is there any way to change this default URL?

Peter Bucher [MVP]
Guest
 
Posts: n/a
#2: Oct 28 '07

re: How to set path to the WebForm JavaScript file


Hello Mike
Quote:
>I need to load the WebForm JavaScript from my own location instead of the
resource URL ( http://localhost/WebResource.axd?
d=4vyf787asdY8c9h_cvayUuA2&t=63323639524538200 0).
A custom Javascript file in a webproject?
Quote:
Is there any way to change this default URL?
Using a script tag with the path?

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET
Michael Nemtsev, MVP
Guest
 
Posts: n/a
#3: Oct 28 '07

re: How to set path to the WebForm JavaScript file


Hello Mike,

use the desired path at src attribute (<script type="text/javascript" src="my.js"></script>)
or consider using "OnDemand" JS pattern http://ajaxpatterns.org/On-Demand_Javascript


---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


Mto load the WebForm JavaScript from my own location instead of the
Mresource URL
M>


Mike via DotNetMonster.com
Guest
 
Posts: n/a
#4: Oct 28 '07

re: How to set path to the WebForm JavaScript file


I know how to add a custom JavaScript. In my case I need to change the
location of the default MS WebForm JavaScript files (the ones that store
methods for the form postback/calbacks and the ASP.NET validators). In .NET 2.
0 these files stored in the System.Web.dll, however I need to load these
files from my own location.


Peter Bucher [MVP] wrote:
Quote:
>Hello Mike
>
Quote:
>>I need to load the WebForm JavaScript from my own location instead of the
>resource URL ( http://localhost/WebResource.axd?
>d=4vyf787asdY8c9h_cvayUuA2&amp;t=6332363952453820 00).
>A custom Javascript file in a webproject?
>
Quote:
>Is there any way to change this default URL?
>Using a script tag with the path?
>
--
Message posted via http://www.dotnetmonster.com

Mike via DotNetMonster.com
Guest
 
Posts: n/a
#5: Oct 28 '07

re: How to set path to the WebForm JavaScript file


I believe .NET 1.0 had a special tables for these standard JavaScript files,
however since .NET 2.0 they were moved to the Web assembly and now <form
runat="server"generates something like this <script src="/WebResource.axd?
d=4vyf787asdY8c9h_cvayUuA2&amp;t=63323639524538200 0"></script>, while I need
to make it <script src="htttp://mydomain/asp_net_standard_js_files/MSWebForms.
js"/></script>




Mike wrote:
Quote:
>I know how to add a custom JavaScript. In my case I need to change the
>location of the default MS WebForm JavaScript files (the ones that store
>methods for the form postback/calbacks and the ASP.NET validators). In .NET 2.
>0 these files stored in the System.Web.dll, however I need to load these
>files from my own location.
>
Quote:
>>Hello Mike
>>
>[quoted text clipped - 5 lines]
Quote:
Quote:
>>Is there any way to change this default URL?
>>Using a script tag with the path?
--
Message posted via http://www.dotnetmonster.com

Mike via DotNetMonster.com
Guest
 
Posts: n/a
#6: Oct 28 '07

re: How to set path to the WebForm JavaScript file


I believe .NET 1.0 had a special tables for these standard JavaScript files,

Sorry, I made a typo in previous message.

special tables = special folder

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200710/1

Peter Bucher [MVP]
Guest
 
Posts: n/a
#7: Oct 28 '07

re: How to set path to the WebForm JavaScript file


Hello Mike
Quote:
>I believe .NET 1.0 had a special tables for these standard JavaScript
>files,
however since .NET 2.0 they were moved to the Web assembly and now <form
runat="server"generates something like this [...] while I need
to make it <script
src="htttp://mydomain/asp_net_standard_js_files/MSWebForms.
js"/></script>
Okay...

I dont know this yet, sorry.
But let me ask you a question: Why you want that include name, what reason?

(If it have to be that name - what reasen ever - you can add it manually,
additional to the original include.)

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET

Mike via DotNetMonster.com
Guest
 
Posts: n/a
#8: Oct 28 '07

re: How to set path to the WebForm JavaScript file


My site has lots of subdomains. Since asp.net generates paths that start with
"/", the user browser will download multiple copies of the same JavaScript.
So, I need to render the full URL that includes not just the path but the
domain name as well.



Peter Bucher [MVP] wrote:
Quote:
>Hello Mike
>
Quote:
>>I believe .NET 1.0 had a special tables for these standard JavaScript
>>files,
>[quoted text clipped - 3 lines]
Quote:
>src="htttp://mydomain/asp_net_standard_js_files/MSWebForms.
>js"/></script>
>Okay...
>
>I dont know this yet, sorry.
>But let me ask you a question: Why you want that include name, what reason?
>
>(If it have to be that name - what reasen ever - you can add it manually,
>additional to the original include.)
>
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200710/1

Closed Thread