473,320 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to set path to the WebForm JavaScript file

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?
Oct 27 '07 #1
7 1659
Hello Mike
>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?
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
Oct 28 '07 #2
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>
Oct 28 '07 #3
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:
>Hello Mike
>>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?
>Is there any way to change this default URL?
Using a script tag with the path?
--
Message posted via http://www.dotnetmonster.com

Oct 28 '07 #4
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:
>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.
>>Hello Mike
[quoted text clipped - 5 lines]
>>Is there any way to change this default URL?
Using a script tag with the path?
--
Message posted via http://www.dotnetmonster.com

Oct 28 '07 #5
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

Oct 28 '07 #6
Hello Mike
>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

Oct 28 '07 #7
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:
>Hello Mike
>>I believe .NET 1.0 had a special tables for these standard JavaScript
files,
[quoted text clipped - 3 lines]
>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

Oct 28 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: hqdtech | last post by:
how to refresh webform from other webform I have 2 webform, i want if webform A was close then webform B wil refresh. And the problem second: how to catch packet on the network in C#. ...
3
by: trint | last post by:
Ok, I have tried to do this with the System.Web.UI and can't find anything for the webform. It seems much easier for a Winform. Any help in trapping Webform keydown event and keyup event is...
5
by: mg | last post by:
Is there a simple way to determine the name & path of the Web page that calls a WebForm when the calling page is another type such as an html, jsp, or .do file.
2
by: mg | last post by:
What code (javascript) will cause a WebForm to be submited (runatserver) whenever a new character is typed into a TextBox from the keyboard?
3
by: Ipsita | last post by:
Hi, I am explaining the scenario of what I am trying to do: - I have a webform with some controls, from which I am taking the data. eg say Username, password - I am passing these data as...
1
by: ffhansix | last post by:
Hi, I have migrated a web site from .NET 1.1.4322 to .NET 2.0. After the migration my Modal webform does not work as it did in 1.1. The webform pops up from a page when a user clicks a button:...
2
by: almurph | last post by:
Hi everyone, I have an APS.NET (v1.1) type button on a webform page. What I want it to do is when the user clicks it, it then calls another webform page that appears in a pop-up window. Now I...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
3
by: NobodyImportant | last post by:
Hello everyone! I admit up front that I am new at this and have very little knowledge of JavaScript, but we have an asp web form that allows for the manipulation of letters our company regularly...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.