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

Open new web page with Response.Redirect 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.Redirect("Exported\\crystal_report_name.p df)"; 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.Redirect, 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 12937
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.com

"eieed" <ei***@discussions.microsoft.com> wrote in message
news:3B**********************************@microsof t.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.Redirect("Exported\\crystal_report_name.p df)"; 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.Redirect, 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.com

"eieed" <ei***@discussions.microsoft.com> wrote in message
news:3B**********************************@microsof t.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.Redirect("Exported\\crystal_report_name.p df)"; 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.Redirect, 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.aspx">
<!--- 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.aspx" target="newWindow">
<!--- Other stuff -->
</form>

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

<form runat="server" target="newWindow">
<!--- 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.com

"eieed" <ei***@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.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.com

"eieed" <ei***@discussions.microsoft.com> wrote in message
news:3B**********************************@microsof t.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.Redirect("Exported\\crystal_report_name.p df)"; 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.Redirect, 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
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...
12
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 ============...
1
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...
3
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 =...
7
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...
1
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...
3
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...
10
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...
2
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...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.