473,396 Members | 1,860 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.

RegisterScriptBlock ??

Hi all,

whats the use for this function RegisterScriptBlock ?

I'm messing around with the ASP.NET 2.0 Callback and in some examples
on the Net I found that the javascript is being added in the Code
behind on the Page_Load event!

Why is this ? Anyone knows?
Thanks very much appreciated

Jul 3 '06 #1
3 1986
"Varangian" <of****@gmail.comwrote in message
news:11**********************@b68g2000cwa.googlegr oups.com...
whats the use for this function RegisterScriptBlock ?

I'm messing around with the ASP.NET 2.0 Callback and in some examples
on the Net I found that the javascript is being added in the Code
behind on the Page_Load event!

Why is this ? Anyone knows?
Loads of reasons. One of the main ones is to allow the server-side code to
provide client-side feedback. E.g. a page may need to be validated
server-side (because maybe the value entered in a textbox has to be looked
up in a database etc). RegisterScriptBlock provides an excellent means of
sending a piece of JavaScript (such as an alert etc) back down to the client
to inform the user that the validation has passed / failed.
Jul 3 '06 #2
Oh thanks... for the reply
does it has anything to do with security ?
Mark Rae wrote:
"Varangian" <of****@gmail.comwrote in message
news:11**********************@b68g2000cwa.googlegr oups.com...
whats the use for this function RegisterScriptBlock ?

I'm messing around with the ASP.NET 2.0 Callback and in some examples
on the Net I found that the javascript is being added in the Code
behind on the Page_Load event!

Why is this ? Anyone knows?

Loads of reasons. One of the main ones is to allow the server-side code to
provide client-side feedback. E.g. a page may need to be validated
server-side (because maybe the value entered in a textbox has to be looked
up in a database etc). RegisterScriptBlock provides an excellent means of
sending a piece of JavaScript (such as an alert etc) back down to the client
to inform the user that the validation has passed / failed.
Jul 3 '06 #3
"Varangian" <of****@gmail.comwrote in message
news:11**********************@h44g2000cwa.googlegr oups.com...
Oh thanks... for the reply
You're welcome.
does it has anything to do with security ?
Nothing whatsoever.
Jul 3 '06 #4

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

Similar topics

2
by: nitc | last post by:
How to access script tag attributes in asp.net from code behind? Thanks in advance Nitc
7
by: moondaddy | last post by:
I want to dynamically create a JavaScript file and cache it on the client for re-use. I know how to write javascript to a web page from the code behind, but I don't know how to actually create a...
8
by: Harry Simpson | last post by:
Got a web app that keeps the 20 sec session timeout default. Only deal is the user doesn't know the session timed out till they submit the page. On one page that i actually don't care if it times...
2
by: chauncy | last post by:
Hi, I have a databound dropdown filled with data. The text value is a file path that I want to use to open that file in a new browser window. I can do this with a html dropdown because I can...
9
by: Mohit Gupta | last post by:
Hi all, I have been thinking for long long time that how to create VB style class in ASP .NET page. Below I am writing code written in normal ASP that I want to convert to ASP .NET. I need your...
3
by: Michael A. Vickers | last post by:
Hi, Does anybody have a method by which they can read script blocks that have been registered via RegisterScriptBlock or RegisterStartupScript? I'd like to manipulate registered script blocks...
1
by: =?Utf-8?B?Wmlub24=?= | last post by:
Hello I have an ASP.NET 2 intranet application written in C#. I use Active Directory authentication and parts of the application uses AJAX. From time to time (about once every 200-300 accesses...
4
by: Olivier Matrot | last post by:
Hello, I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. This ends with the following exception : <Source>System</Source> <StackTrace...
1
by: Olivier Matrot | last post by:
I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. After further analysis, it appears that : - There is 2 disctinct session for the...
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
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.