473,395 Members | 1,468 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.

RegisterStartupScript isn't working

Hi all...

I have an ASPX page that is part of a frameset whose Page_Load method
contains this simple code:

RegisterStartupScript("test", "<script>alert('hola');</script>")

When I debug, I can realize that script is registered (by using
IsStartupScriptRegistered method) but it isn't sent to the browser.

What may be happening?

Any help will be greatly appreciated.
Thanks

I have ASP.NET 2.0.

Jaime
Nov 19 '05 #1
1 1310
Did you try Page.ClientScript.RegisterStartupScript(...) if it has the same
prob?

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Jaime Stuardo" <Ja**********@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
Hi all...

I have an ASPX page that is part of a frameset whose Page_Load method
contains this simple code:

RegisterStartupScript("test", "<script>alert('hola');</script>")

When I debug, I can realize that script is registered (by using
IsStartupScriptRegistered method) but it isn't sent to the browser.

What may be happening?

Any help will be greatly appreciated.
Thanks

I have ASP.NET 2.0.

Jaime

Nov 19 '05 #2

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

Similar topics

6
by: Bill Jones | last post by:
I'm trying to use this.RegisterStartupScript to add some javascript to and aspx page that will run when the page is loaded. Does anyone know if this function only works in the Page_Load function? ...
11
by: Stan Sainte-Rose | last post by:
Hi, I m working on a user control. I need to use a Js file, I would like to know how to load the js file using RegisterStartupScript command from the user control. Also, if I load the same user...
2
by: Marshal Antony | last post by:
Hi, I have a problem with using Page.RegisterStartupScript to call some javascript code from ASP.NET using C# is not working in Netscape.It is working fine in Internet Explorer.Does anybody know...
4
by: Joseph Burton | last post by:
When I put this code in my load function it works just fine. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load RegisterStartupScript("",...
2
by: Dav | last post by:
In my ASP.NET codebehind I have the following code to jump to a certain section of the page: --- Dim strAnchorScript As String = "<script language='javascript'>" & _ "window.location.hash='#" &...
3
by: MJP | last post by:
I have a button which kicks off the generation of a report after which the file will be downloaded. The report generation can take a long time, so client side onclick event of the button also...
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...
3
by: Rob | last post by:
Hi, We've developed an ajax enabled web app which we're currently deploying to our production server. We use System.Web.UI.Page.RegisterStartupScript throughout the app, and all has worked well...
9
by: 0301102 | last post by:
I using following script in my project. Once click the button and there will open a pop up window. But "Page.ClientScript.RegisterStartupScript" script seem NOT working in update panel. After remove...
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
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
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
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
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...
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...

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.