advcomputer
Posts: 68
|
| Posted: 03/01/2007, 12:28 PM |
|
I have an interesting problem that I have solved, however I am looking for a more elegant way of handling the problem.
I have been requested to put on the search page a check box, that if selected will export report data to Excel. The export functionality is simple using;
Response.ContentType = "application/vnd.ms-excel"
however the issue is as follows.
I need to redirect to two redirect to 2 different pages. One page for HTML and another page for the Excel output (the excel page is formatted very differently).
The current way that I am doing this involves Javascript, looking to see if the Checkbox has been selected and if so, I then change the form action and do a submit.
I was wondering if there was a way of doing this on the back end via ASP instead of using Javascript.
Any help would be appreciated.
Thanks in advance...
-Jeff
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 03/01/2007, 1:44 PM |
|
Sounds like a good solid solution.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 03/04/2007, 10:41 AM |
|
I often have coditional rdirects.
This, however, usually requires a slight modification to the CodeCharge
generated sections.
"advcomputer" <advcomputer@forum.codecharge> wrote in message
news:645e7378116284@news.codecharge.com...
>I have an interesting problem that I have solved, however I am looking for
>a
> more elegant way of handling the problem.
>
> I have been requested to put on the search page a check box, that if
> selected
> will export report data to Excel. The export functionality is simple
> using;
>
> Response.ContentType = "application/vnd.ms-excel"
>
> however the issue is as follows.
>
>
> I need to redirect to two redirect to 2 different pages. One page for HTML
> and
> another page for the Excel output (the excel page is formatted very
> differently).
>
> The current way that I am doing this involves Javascript, looking to see
> if the
> Checkbox has been selected and if so, I then change the form action and do
> a
> submit.
>
> I was wondering if there was a way of doing this on the back end via ASP
> instead of using Javascript.
>
> Any help would be appreciated.
>
> Thanks in advance...
>
> -Jeff
> _________________
> Jeff Goldstein
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
advcomputer
Posts: 68
|
| Posted: 03/04/2007, 12:53 PM |
|
Is your redirect done backend with ASP or client side with Javascript. If you have a better way,. please share.
-Jeff
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 03/04/2007, 5:32 PM |
|
It is done at the backend.
Look in the main asp file (not the _events) for Redirect.
You will see some conditionals thre. That is where I make the changes.
I do not have access to the code, but if you cannot figure it out let me
know and I will post something tomorrow).
"advcomputer" <advcomputer@forum.codecharge> wrote in message
news:645eb31dd2aa3d@news.codecharge.com...
> Is your redirect done backend with ASP or client side with Javascript. If
> you
> have a better way,. please share.
>
> -Jeff
> _________________
> Jeff Goldstein
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|