473,799 Members | 3,026 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open new web page with Response.Redire ct or something else?

I have a web page that is designed to allow users to run crystal reports
which are then exported into PDF formats. Currently, when the user clicks
the "Submit" button there is some processing to build the PDF file and then I
use a Response.Redire ct("Exported\\c rystal_report_n ame.pdf)"; command to
redirect the page. However, the user wants the PDF file to open in a new
window. Is there a way I can do this? It doesn't have to be
Response.Redire ct, just some way to open a new window basically and then I
can always pass the file name and redirect on the page load. Thanks for any
help!

Ed
Nov 16 '05 #1
3 12978
Ed,

What you want to do on your page is add the target element to your form
(you have to be careful, because target on the ASPX page is going to be set
to "server", and that's not what you want processed). You can set the
target attribute to a name of the window that the result should be in. If
there is no window with that name, then a new one with that name is created.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"eieed" <ei***@discussi ons.microsoft.c om> wrote in message
news:3B******** *************** ***********@mic rosoft.com...
I have a web page that is designed to allow users to run crystal reports
which are then exported into PDF formats. Currently, when the user clicks
the "Submit" button there is some processing to build the PDF file and
then I
use a Response.Redire ct("Exported\\c rystal_report_n ame.pdf)"; command to
redirect the page. However, the user wants the PDF file to open in a new
window. Is there a way I can do this? It doesn't have to be
Response.Redire ct, just some way to open a new window basically and then I
can always pass the file name and redirect on the page load. Thanks for
any
help!

Ed

Nov 16 '05 #2
Nicholas,

I appreciate your help, but I'm still very confused. I don't know what you
mean by "add the target element to your form". Also, how and when would I
set the target attribute? Do you have an example you can direct me to or
anything? Web Apps are not my speciality (obviously), so I'm not familiar
with some things that are probably obvious. I appreciate any additional help
you can provide.

Ed

"Nicholas Paldino [.NET/C# MVP]" wrote:
Ed,

What you want to do on your page is add the target element to your form
(you have to be careful, because target on the ASPX page is going to be set
to "server", and that's not what you want processed). You can set the
target attribute to a name of the window that the result should be in. If
there is no window with that name, then a new one with that name is created.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"eieed" <ei***@discussi ons.microsoft.c om> wrote in message
news:3B******** *************** ***********@mic rosoft.com...
I have a web page that is designed to allow users to run crystal reports
which are then exported into PDF formats. Currently, when the user clicks
the "Submit" button there is some processing to build the PDF file and
then I
use a Response.Redire ct("Exported\\c rystal_report_n ame.pdf)"; command to
redirect the page. However, the user wants the PDF file to open in a new
window. Is there a way I can do this? It doesn't have to be
Response.Redire ct, just some way to open a new window basically and then I
can always pass the file name and redirect on the page load. Thanks for
any
help!

Ed


Nov 16 '05 #3
Ed,

On the client side, if you have a form like this:

<form action="http://www.mysite.com/processForm.asp x">
<!--- Other stuff -->
</form>

You can change it to this, and it will open the results of processing
the form in a new window:

<form action="http://www.mysite.com/processForm.asp x" target="newWind ow">
<!--- Other stuff -->
</form>

Now, in ASP.NET, you have this in your ASPX page:

<form runat="server" target="newWind ow">
<!--- Other stuff -->
</form>

And that will open it in a new window (with the name "newWindow" ).

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"eieed" <ei***@discussi ons.microsoft.c om> wrote in message
news:00******** *************** ***********@mic rosoft.com...
Nicholas,

I appreciate your help, but I'm still very confused. I don't know what
you
mean by "add the target element to your form". Also, how and when would I
set the target attribute? Do you have an example you can direct me to or
anything? Web Apps are not my speciality (obviously), so I'm not familiar
with some things that are probably obvious. I appreciate any additional
help
you can provide.

Ed

"Nicholas Paldino [.NET/C# MVP]" wrote:
Ed,

What you want to do on your page is add the target element to your
form
(you have to be careful, because target on the ASPX page is going to be
set
to "server", and that's not what you want processed). You can set the
target attribute to a name of the window that the result should be in.
If
there is no window with that name, then a new one with that name is
created.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"eieed" <ei***@discussi ons.microsoft.c om> wrote in message
news:3B******** *************** ***********@mic rosoft.com...
>I have a web page that is designed to allow users to run crystal reports
> which are then exported into PDF formats. Currently, when the user
> clicks
> the "Submit" button there is some processing to build the PDF file and
> then I
> use a Response.Redire ct("Exported\\c rystal_report_n ame.pdf)"; command
> to
> redirect the page. However, the user wants the PDF file to open in a
> new
> window. Is there a way I can do this? It doesn't have to be
> Response.Redire ct, just some way to open a new window basically and
> then I
> can always pass the file name and redirect on the page load. Thanks
> for
> any
> help!
>
> Ed


Nov 16 '05 #4

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

Similar topics

0
1680
by: Moshe | last post by:
Page with a <form> action calls ASP page. The ASP page has the following structure <%@ LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Option Explicit %> <% Server.ScriptTimeOut=100 With Response .Buffer = True .Expires = 0 .Clear
12
3538
by: Matt | last post by:
I want to write a ASP page to open/download a file In fileview.jsp, I have the file browse, and when user click submit button, fileview2.asp should open the file. fileview.asp ============ <FORM ACTION="fileview2.asp" method="POST"> <P><input type="FILE" name="filename"> <P><input type="submit">
1
3032
by: Jason Huang | last post by:
Hi, Would someone tell me how to open a CrystalReport in my ASP.Net C#? We can use the Show method to open a windows form, but what method should we use for opening a CrystalReport? Thanks for help. Jason
3
9765
by: Stephen Witter | last post by:
I am currently using response.redirect in a aspx to go to a web page. What I want is to open the page in a new window. My dotnet code is as follows: Dim sFileName as string = "/TempReports/tempReport.pdf" response.redirect(sFileName) This opens in the same frame and I want to use something like window.open so I can force a new page and control the size of the window, etc.... One thing I thought about is calling a javascript
7
3708
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a satisfactory answer (check your browser) so now that I've had the time to set up a reasonable little test that I can post somewhere, I'll try again. The app I've written has three ASPX pages. One is a combined page which writes a little text...
1
1514
by: AMD Desktop | last post by:
Hi, I have a problem and not sure what is going on here, may be the coding is not proper. This is a simple page with calendar events. Everything works fine until I click on View Week link. Then page hangs. Clicking on a day or Next Month or Previous Month work just fine. Here is the code: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
2028
by: kermit | last post by:
Hi, I am hoping this is a foolish or simple question. I am creating a multiuser app. consisit of a login page and a dataentry page. If the user leaves the data entry page (other than exiting the browser). I want them to 'have' to go back through the login screen and re-login. My problem is the browser's (IE 6) Back and Forward buttons. If the user clicks the Back button from the data entry screen they go to the login in screen and if...
10
12213
by: GreggTB | last post by:
I've got an page (LOGIN.ASPX) that receives the user's login information. During the page load, it checks the credentials against a database and, if validation is successful, creates an instance of an object that stores the user's basic profile data (username, user type, associated sales region, etc.). I've been taking this user info and placing it in the Session object like so... Session = user;
2
10511
by: karenkksh | last post by:
Hi, public partial class Staff_LeaveNew : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
0
9688
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10247
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10031
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7571
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.