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

Does Page.RegisterClientScriptBlock Not Work Under ASP.NET 2.0?

Hello,

I have an app that was xcopy deployed from an ASP.NET 1.1 W2KServer to a box
running ASP.NET 2.0 W2003Server. The app runs fine with the exception of
where I use the above method. It just doesn't seem to work at all anymore. I
get no errors...but what used to work...now just doesn't work.

I use it to emit jscript from an opened window to reflect changes being made
back on the parent window that launched it.
Any ideas?

Paul Reed

---------------------------------------
Jackson-Reed, Inc. www.jacksonreed.com
Nov 5 '07 #1
8 6606
On Nov 5, 9:21 am, Paul Reed <PaulR...@discussions.microsoft.com>
wrote:
Hello,

I have an app that was xcopy deployed from an ASP.NET 1.1 W2KServer to a box
running ASP.NET 2.0 W2003Server. The app runs fine with the exception of
where I use the above method. It just doesn't seem to work at all anymore. I
get no errors...but what used to work...now just doesn't work.

I use it to emit jscript from an opened window to reflect changes being made
back on the parent window that launched it.
Any ideas?

Paul Reed

---------------------------------------
Jackson-Reed, Inc.www.jacksonreed.com
Hi...

Try using

if (!Page.ClientScript.IsClientScriptBlockRegistered( "Key"))
{

Page.ClientScript.RegisterClientScriptBlock(this.G etType(), "Key",
script);
}
Thanks
Masudur

Nov 5 '07 #2
"Paul Reed" <Pa******@discussions.microsoft.comwrote in message
news:52**********************************@microsof t.com...
Any ideas?
http://www.velocityreviews.com/forum...aspnet-20.html
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 5 '07 #3
Paul Reed wrote:
Hello,

I have an app that was xcopy deployed from an ASP.NET 1.1 W2KServer to a box
running ASP.NET 2.0 W2003Server. The app runs fine with the exception of
where I use the above method. It just doesn't seem to work at all anymore. I
get no errors...but what used to work...now just doesn't work.

I use it to emit jscript from an opened window to reflect changes being made
back on the parent window that launched it.
Any ideas?
The Page.RegisterClientScriptBlock method has been deprecated in favor
of the Page.ClientScript.RegisterClientScriptBlock method.

It still works, though. It's more likely that there is something wrong
with the Javascript code. Have you enabled Javascript error messages in
Internet Explorer? Otherwise they will just show up as a notification in
the status bar. If you are using Firefox, open the Error Console to see
the error messages.

--
Göran Andersson
_____
http://www.guffa.com
Nov 5 '07 #4
Thanks,

Well...I do have error reporting enabled for jscript but I get no error.
Here is my VB.NET code...which again has been working like a champ for years
on ASP1.1. Its also my understanding as well that the older (deprecated sig)
for this method should still work. I don't use VS2005 yet...so I am not
planning on having to change the code specific to 2.0 (I can change the
jscript if for some reason it is now the culprit...but don't know why).
Again...this app was simply copy deployed to the new box.
Dim strjscript As String = "<script language=""javascript"">"

txttotal.Text = CStr(dcTotal)

strjscript = strjscript & "window.opener.setEstimate("
strjscript = strjscript & txtBidHeader.Text & ", "
strjscript = strjscript & dcTotal & ", "
strjscript = strjscript & "'" & strDescription & "'"

strjscript = strjscript & ");window.close();"
strjscript = strjscript & "</script>"
Page.RegisterClientScriptBlock("", strjscript)
--
---------------------------------------
Jackson-Reed, Inc. www.jacksonreed.com
"Göran Andersson" wrote:
Paul Reed wrote:
Hello,

I have an app that was xcopy deployed from an ASP.NET 1.1 W2KServer to a box
running ASP.NET 2.0 W2003Server. The app runs fine with the exception of
where I use the above method. It just doesn't seem to work at all anymore. I
get no errors...but what used to work...now just doesn't work.

I use it to emit jscript from an opened window to reflect changes being made
back on the parent window that launched it.
Any ideas?

The Page.RegisterClientScriptBlock method has been deprecated in favor
of the Page.ClientScript.RegisterClientScriptBlock method.

It still works, though. It's more likely that there is something wrong
with the Javascript code. Have you enabled Javascript error messages in
Internet Explorer? Otherwise they will just show up as a notification in
the status bar. If you are using Firefox, open the Error Console to see
the error messages.

--
Göran Andersson
_____
http://www.guffa.com
Nov 5 '07 #5
"Paul Reed" <Pa******@discussions.microsoft.comwrote in message
news:91**********************************@microsof t.com...
Its also my understanding as well that the older (deprecated sig) for this
method should still work.
It's not just deprecated - it's officially obsolete:
http://msdn2.microsoft.com/en-us/lib...ck(vs.80).aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 5 '07 #6
Mark,

Wow...this is bad news for me. I'm surprised my app didn't throw an error
then. Do you know if ASP.NET 1.1 can be run side-by-side on a box that is
also running ASP.NET 2.0? I know that both versions of the .NET framework can
co-exist on the same box. Thank you so much for taking the time to reply to
my previous posts.

Regards,

Paul Reed
--
---------------------------------------
Jackson-Reed, Inc. www.jacksonreed.com
"Mark Rae [MVP]" wrote:
"Paul Reed" <Pa******@discussions.microsoft.comwrote in message
news:91**********************************@microsof t.com...
Its also my understanding as well that the older (deprecated sig) for this
method should still work.

It's not just deprecated - it's officially obsolete:
http://msdn2.microsoft.com/en-us/lib...ck(vs.80).aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 5 '07 #7
"Paul Reed" <Pa******@discussions.microsoft.comwrote in message
news:32**********************************@microsof t.com...
Do you know if ASP.NET 1.1 can be run side-by-side on a box that is
also running ASP.NET 2.0?
Yes - just make sure you specify the correct target framework in the virtual
directory settings...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 5 '07 #8
Mark,

Thanks...I should have researched my last question and not bothered you on
that. I've found doc for aspnet_regiis and will get busy. Thanks to you I'm
not spinning my wheels any longer.

Paul
--
---------------------------------------
Jackson-Reed, Inc. www.jacksonreed.com
"Mark Rae [MVP]" wrote:
"Paul Reed" <Pa******@discussions.microsoft.comwrote in message
news:32**********************************@microsof t.com...
Do you know if ASP.NET 1.1 can be run side-by-side on a box that is
also running ASP.NET 2.0?

Yes - just make sure you specify the correct target framework in the virtual
directory settings...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 5 '07 #9

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

Similar topics

6
by: anon | last post by:
How *EXACTLY* does Smart Navigation work? (I would really really really like for this Smart Navigation to work in Mozilla.) The inner workings and the code is what I am looking for. Does it...
1
by: John | last post by:
Hi, Does Dotfuscator really work? I mean is there no way to decompile your program when it's done? Or does it just make it more difficult to work with the decompiled code? Also, is there...
12
by: Frank Hauptlorenz | last post by:
Hello Out there! I have a DB2 V7.2 Database (Fix11) on Win 2000 Professional. It was before a NT 4 based Domain - now it is a Win 2000 Domain. The database server is a domain member. Now...
3
by: Mike P | last post by:
Is there a difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript? I've seen them both in code examples and they both seem to be doing the same thing. Any help would...
1
by: John Livermore | last post by:
I have a user control that can be created from a variety of other user controls. It is the same no matter where it is created from, and I only want one instance of it on the page. Is there a...
2
by: Earl Teigrob | last post by:
I have a Web Custom Control that builds javascript to write to the page. The DatePickerJs() function builds over 500 lines of javacript code. Even thought my Custom Web Control does not write it to...
2
by: Andrew | last post by:
Hi, I have written this code, but I have received an error message for the javascript code. This is written in the html of the page. <a href="default.aspx" id="NoAccessAllowed"...
9
by: Nathan Sokalski | last post by:
I have used the RegisterClientScriptBlock method in external functions of mine (ones that are saved in a separate *.vb file), where I use them as follows: Public Shared Sub MyFunction(ByVal...
5
by: Gaby | last post by:
i was informed that one of out pages wasnt working. the user was on firefox and said our page wasnt functioning but whenever i use IE it works fine. is there any reason or something in the code...
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
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
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...
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.