Solved

Issue with ClientScript.RegisterClientScriptBlock

Posted on 2007-11-21
1
1,651 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 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