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

sending JavaScript code from server control to client ???

How can I send a javascript code from an asp server control to client
and run that script on client
for example;
when an asp server button clicked, an alert javascript must be sent to
client and run on the client
how can I do that?

please send an example if possible,

thank you very much!
Nov 18 '05 #1
2 1352
Response.Write()

If you have something like that though this will not execute until the page
is completly renedered to the client. There is no way to "pause and wait"
for something from the client, WWW is not designed this way.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Oney" <oz*********@yahoo.com> wrote in message
news:cc**************************@posting.google.c om...
How can I send a javascript code from an asp server control to client
and run that script on client
for example;
when an asp server button clicked, an alert javascript must be sent to
client and run on the client
how can I do that?

please send an example if possible,

thank you very much!

Nov 18 '05 #2
string s = "<script type=\"text/javascript\">alert(\"This is an
alert!\");</script>";
if (!(Page.IsStartupScriptRegistered("AlertScript")))
Page.RegisterStartupScript("AlertScript", s);

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Oney" <oz*********@yahoo.com> wrote in message
news:cc**************************@posting.google.c om...
How can I send a javascript code from an asp server control to client
and run that script on client
for example;
when an asp server button clicked, an alert javascript must be sent to
client and run on the client
how can I do that?

please send an example if possible,

thank you very much!

Nov 18 '05 #3

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

Similar topics

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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.