473,623 Members | 3,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Abount separate java script code with asp.net.

Hi,

Are there anyone can help me? My questions are as following:
Because I have a tools bar which coding with javascript, it will reuse
very often. So I want to separate the client-side java script code
with asp.net .
And make the client-side java script code as user defined cotrol.
But I only find the RegisterClientS criptBlock method, it only can
insert java script code to <body></body> in html.
But my java script code must insert between <head> and </head> in
html.

Are there any solution can separate java script code with asp.net and
reached to my request?

Thanks,

Jeff
Nov 18 '05 #1
4 2931
Jeff,

I'd just try putting all your javascript code into a sinlge .js file and
then reference this where needed in the <head> section of the aspx file like
the following: <head><script language="javas cript"
src="common.js" ></script></head>

"Jeff" <je****@cm1.hin et.net> wrote in message
news:30******** *************** ***@posting.goo gle.com...
Hi,

Are there anyone can help me? My questions are as following:
Because I have a tools bar which coding with javascript, it will reuse
very often. So I want to separate the client-side java script code
with asp.net .
And make the client-side java script code as user defined cotrol.
But I only find the RegisterClientS criptBlock method, it only can
insert java script code to <body></body> in html.
But my java script code must insert between <head> and </head> in
html.

Are there any solution can separate java script code with asp.net and
reached to my request?

Thanks,

Jeff

Nov 18 '05 #2
Hi,

But I want to make it into asp .net user defined cotrl.
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
Sorry I don't see why this needs to be in a usercontrol, unless the control
is dynamically generating the javascript?

"jeff Tseng" <je****@cm1.hin et.net> wrote in message
news:eV******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

But I want to make it into asp .net user defined cotrl.
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4
Hi,

Because I will reuse this javascript very often. For example, the
treeview or menu functions in all page. Those functions were make by
java script with GUI.

Jeff
"Janaka" <ja****@magical ia.com> wrote in message news:<#Z******* *******@TK2MSFT NGP12.phx.gbl>. ..
Sorry I don't see why this needs to be in a usercontrol, unless the control
is dynamically generating the javascript?

"jeff Tseng" <je****@cm1.hin et.net> wrote in message
news:eV******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

But I want to make it into asp .net user defined cotrl.
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #5

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

Similar topics

4
1745
by: lawrence | last post by:
I want to offer my friends a ping service, where certain of their pages will be called once a week. My impression is that no PHP script can be made to run very long. Assuming a situation where I don't have access to cron, should I write the service as Java application and set it to run forever on my webserver? Or let's put it another way. Assume I want to write a remind service, where people are reminded of friend's birthdays. Should I...
0
9869
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ********************************** package Celcom.Client;
4
12069
by: Laura P | last post by:
Hi, I wasn't sure whether this should be posted in the Java are or in a Solaris thread, so I shall post it in both. Sorry for the duplication. I am new to Solaris and am having trouble running a long Java command from a shell script. Firstly, my Solaris (8) / Java setup. Mu machine already had Java 1.2
4
1840
by: Don Grover | last post by:
I hope some one can help, I have a html table that is created with asp that has a row of repeated buttons down the side. these call a page passing a query string with invoice number. I need to get a Java Yes/No dialog up and on yes call the hyperling query string. I can do this with a single hyperlink but not passing on the query string and invnumber Here is my Response Write link
6
3508
by: Paul Fame | last post by:
Hello World, This is not a flame, but a question about the fundamentals of the language. Unlike some languages, C++ requires class member functions to be declared twice: once in the class declaration and again in the definition. This is not too much of a pain for most simple classes but I really hate the syntax for member functions of templated classes: template<class A, class B, class C> void ClassName<A, B, C>::FuncName() {}
3
5677
by: wolf | last post by:
Can I de-crypt the data by java which is crypt by DESCryptoServiceProvider? The following is my code to crypt data: string text = "This is My source data"; byte source = System.Text.Encoding.Unicode.GetBytes(text); DESCryptoServiceProvider des = new DESCryptoServiceProvider(); des.Key = this.key; des.IV = this.iv;
34
3311
by: kpg | last post by:
Hello all, I have an asp.net web application with tons of Java script files. I would like to protect the Java Script somehow so it can't be seen by a remote user. I found several 3rd party solutions, but I thought I remember that there was a way to 'compile' java script and use that instead of the actual script?
9
2382
by: Mickey Segal | last post by:
The long-simmering Eolas patent dispute: http://www.microsoft.com/presspass/press/2003/oct03/10-06EOLASPR.mspx has led to an optional Microsoft Update: http://support.microsoft.com/kb/912945/en-us that creates non-JavaScript problems that can be fixed using JavaScript. With the Microsoft update installed, Java applets (as well as other content such as Flash videos) are unable to receive user input until an activating click or key press....
4
6185
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages generated are written to a log file. A project team working in the same company as me here would like to use this loading utility. They write UI applications for Windows using Java. They were able to launch the Python script from within Java by...
0
8221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8662
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8603
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8317
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6104
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5560
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2593
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1468
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.