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

JavaScript in ASP.NET

Hi all,

where can I find a good introduction on adding JavaScript
dynamical to my asp.net page? All books about asp.net
contain only little information on this!

Thx

Jenny
Nov 17 '05 #1
5 898
You can output any javascript dynamically from your code behind using such
function as:

RegisterStartupScript:
http://msdn.microsoft.com/library/de...criptTopic.asp

RegisterClientScriptBlock:
http://msdn.microsoft.com/library/de...BlockTopic.asp

Attributes.Add:
http://www.flws.com.au/showusyourcod...To.asp?catID=5

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Jenny" <j.********@SPAMx-mail.net> wrote in message
news:05****************************@phx.gbl...
Hi all,

where can I find a good introduction on adding JavaScript
dynamical to my asp.net page? All books about asp.net
contain only little information on this!

Thx

Jenny

Nov 17 '05 #2
Don't forget, if your javascript block must be in the Body of the page, you
can still use <% Response.Write("<script> ... </script>") %> blocks in
the body. If you output your script in Page_load, it won't go into the body.
What do you want to know?

Justin Dutoit

"Jenny" <j.********@SPAMx-mail.net> wrote in message
news:05****************************@phx.gbl...
Hi all,

where can I find a good introduction on adding JavaScript
dynamical to my asp.net page? All books about asp.net
contain only little information on this!

Thx

Jenny

Nov 17 '05 #3

Hi Justin,

thanks for answer. A code example would be helpful. I'm
adding a button dynamical to my page (into a panel).

If this button is clicked I like a popup to be shown! Do
you know an easy example for me to try it?

Thanks

Jenny
Nov 17 '05 #4
Check out this example, this should help you to understand how to add
javascript dynamically to asp.net page,
http://www.fawcette.com/vsm/2002_07/...default_pf.asp

--
Saravana
Microsoft India Community Star,MC**
www.extremeexperts.com

"Jenny" <j.********@SPAMx-mail.net> wrote in message
news:08****************************@phx.gbl...

Hi Justin,

thanks for answer. A code example would be helpful. I'm
adding a button dynamical to my page (into a panel).

If this button is clicked I like a popup to be shown! Do
you know an easy example for me to try it?

Thanks

Jenny

Nov 17 '05 #5
Jenny,

If you want I've got a javascript object (and many others) all including the
project source code and all for free that you can download from my web site,
www.aboutfortunate.com.

It lets you add javascript pop up boxes and confirmations to buttons (or
almost any other .net object). It also has code for setting default buttons
if the enter key is pressed while in a text box to allow the same
functionality you used to have in asp when you could create multiple forms
on a single page.

Most of the objects can be placed in your toolbox. And I've also created
intellisense for all the projects I have on the site and a help file.

Even if you decide not to use the objects themselves, the source code is
good to learn from.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Jenny" <j.********@SPAMx-mail.net> wrote in message
news:08****************************@phx.gbl...

Hi Justin,

thanks for answer. A code example would be helpful. I'm
adding a button dynamical to my page (into a panel).

If this button is clicked I like a popup to be shown! Do
you know an easy example for me to try it?

Thanks

Jenny

Nov 17 '05 #6

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

Similar topics

1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.