473,396 Members | 1,982 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,396 software developers and data experts.

Correct use of ClientScript.RegisterClientScriptInclude

Hi guys,

I'm using asp.net 2.0, can anybody send me some complete examples on using
ClientScript.RegisterClientScriptInclude and
ClientScript.RegisterClientScriptSource, for registering an external
javascript file (myfile.js) in my ASP page, I have not found any clear or
complete examples, meaning in wich event handler should I put it in
page_load? if I'm using a master page where is the correct place to put it
in?
please any help would be very appreciated.

Regards
Feb 22 '07 #1
2 1849
Please could you not post duplicates? Resolution is here:
http://www.microsoft.com/communities...8-532e9571be8b
--
Milosz

"verci" wrote:
Hi guys,

I'm using asp.net 2.0, can anybody send me some complete examples on using
ClientScript.RegisterClientScriptInclude and
ClientScript.RegisterClientScriptSource, for registering an external
javascript file (myfile.js) in my ASP page, I have not found any clear or
complete examples, meaning in wich event handler should I put it in
page_load? if I'm using a master page where is the correct place to put it
in?
please any help would be very appreciated.

Regards
Feb 22 '07 #2
Hi Milosz,

First, thank you so much for your complete answer. :)

Second, sorry about that bunch of posts but my outlook express was acting
weird, kept closing when I tried to post messages.

"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plwrote in message
news:C1**********************************@microsof t.com...
Please could you not post duplicates? Resolution is here:
http://www.microsoft.com/communities...8-532e9571be8b
--
Milosz

"verci" wrote:
>Hi guys,

I'm using asp.net 2.0, can anybody send me some complete examples on
using
ClientScript.RegisterClientScriptInclude and
ClientScript.RegisterClientScriptSource, for registering an external
javascript file (myfile.js) in my ASP page, I have not found any clear or
complete examples, meaning in wich event handler should I put it in
page_load? if I'm using a master page where is the correct place to put
it
in?
please any help would be very appreciated.

Regards

Feb 23 '07 #3

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

Similar topics

7
by: sck10 | last post by:
Hello, I have the following sub in a class in my "App_Code" directory. The script is for setting focus on a particular control, but I get the error, "Name ClientScript Not declared". Also, I am...
2
by: Alex Maghen | last post by:
I want to create a C# class where I'll have a bunch of static functions which will use the ClientScript object to dump out some JavaScript dynamically. But I can't figure out how to get a hold of...
4
by: WT | last post by:
Having questions and problems with this method. I have a control library that embed its .gif and js, html and htc in its ressources Corresponding Attributes are added to the namespace using...
4
by: Jon Paal | last post by:
"Page.Clientscript" does not compile in assembly, with the error message "Reference to a non-shared member requires an object reference". ... what reference is it looking for ?????? class...
0
by: verci | last post by:
Hi guys, Can anybody sent me some good examples on using ClientScript.RegisterClientScriptInclude and ClientScript.RegisterClientScriptSource, I've just haven't found much info on how to use...
1
by: HockeyFan | last post by:
My function to get an alert box on the page isn't working. Instead it puts in the bottom section of the page: <script type="text/javascript"> <!-- This is a test// --> </script> The...
9
by: Dariusz Tomoń | last post by:
Hello, I'd like to include JS from C# code (ASP.NET 2.0). I'm trying not directly from i.e. default.aspx.cs code but from a class belonging to DLL, which is referred in my project. The code...
1
by: Dave Mathew | last post by:
Is there any way to use RegisterClientScriptInclude to generate the script tags inside of the <headtag? I'm using RegisterClientScriptInclude inside of Page_Load event in the code behind for the...
5
by: Tony | last post by:
Hi, I have two questions: 1) With this code, i never see the alert message. Why? How to see it? Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "myscript", _ " alert('you go to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.