471,072 Members | 1,378 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,072 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 12849
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jason Huang | last post: by
3 posts views Thread by Stephen Witter | last post: by
1 post views Thread by AMD Desktop | last post: by
reply views Thread by leo001 | last post: by

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.