Solved

Issue with ClientScript.RegisterClientScriptBlock

Posted on 2007-11-21
1
1,649 Views
Last Modified: 2008-02-01
I have an application that I need to call a new window to open up a report.  Here is my full line statement:  ClientScript.RegisterClientScriptBlock(Me.GetType, "newwindow", "<script language=javascript>window.open('" & QueryString & "', 'NewWindow')</script>")

The problem I'm having is the new screen doesn't open up.  It just runs through the code and stays on the same page with opening a new page for the report.  The other thing is that I have the same line of code in another application and it works correctly.  The only difference that I can find is that the application that doesn't work is using a tab control from AJAX.  Could this be my problem?  Thanks for the help.
0
Comment
Question by:aot-johnstown
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 20329151
RegisterClientScriptBlock doesn't execute the Javascript function, it adds the function to the page so that you can call it.  This is usually accomplished by adding an attribute to an HTML element.

Bob
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now