Querystring and Viewstate
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngescalate' list.


Moore, Matthew
This question has been asked on freeforall, client, and I think even the cs list. Even after adding the NOT ANSWERED YET subject, no luck. Thanks Steve for your help with this so far. :)

Matt

I have a webpage which when you hit the submit button, results from a search are posted in a datagrid format. I am not using any values in the querystring nor am I reading from the querystring. There is only one page that gets run. I would like to add 2 options to my page once the results are displayed. I would like to add a printable format button and an e-mail page button. If I create a printable format, I cannot get my results to stay without basically calling the Search. If I have the results and go do a file -> Send -> Page by E-mail, what gets displayed in the e-mail is the original page that loaded with the validators showing the text that would be displayed if they were violated.

The following is a short/sweet version of what I would need but cannot reproduce.

a) Construct a page URL that is guaranteed to produce the same page you're currently on, so that you can then scrape that URL for the contents of an email/print page

or

b) Capture the output of the current page's HTML just before it is sent across the wire and hold it somewhere (session, cache, database, whatever) so that it is available to send in an email or format for printing.

Reply to this message...
 
    
Johnson, Peter
I don't have your answer to spell out but I do have a couple bits that might
help.

First of all, I've noticed whenever I use IE's feature to save a web page,
it gives some request to the server again instead of taking the output it
got and saving that. So on CGI scripts, where I think I'm getting a receipt
or what have you, I get some generic error page saved instead. I don't know
why IE thinks it has to fire the request out again, but I'm guessing that's
why your Send Page By E-mail doesn't work.

Second, have you looked at HTTP handlers? Maybe you could intercept the
incoming request, have a custom HTTP handler send the request to the proper
ASP.NET page for processing, then save off the response somewhere before
passing that back to the client. Might be a long shot though...

--Peter

[Original message clipped]

----------------------------------------------------------------------------

This e-mail and any attachments may be confidential or legally privileged.
If you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing, disclosing or using any information
contained herein. Please inform us of the erroneous delivery by return
e-mail.

Thank you for your cooperation.

----------------------------------------------------------------------------

Reply to this message...
 
    
James R. Thomas

Try this:

If (IsPostBack and results are not stored in session) {
-- do search
-- store results in session
}
if (results are stored in session) {
set datasource to results from session
}

This will have the effect of always returning the data once the search
has been done.

Jim Thomas
DialtoneUSA
Click here to reveal e-mail address

-----Original Message-----
From: Moore, Matthew [mailto:Click here to reveal e-mail address]=20
Sent: Monday, April 22, 2002 3:21 PM
To: aspngescalate
Subject: [aspngescalate] Querystring and Viewstate

This question has been asked on freeforall, client, and I think even the
cs list. Even after adding the NOT ANSWERED YET subject, no luck.
Thanks Steve for your help with this so far. :)

Matt

I have a webpage which when you hit the submit button, results from a
search are posted in a datagrid format. I am not using any values in
the querystring nor am I reading from the querystring. There is only
one page that gets run. I would like to add 2 options to my page once
the results are displayed. I would like to add a printable format
button and an e-mail page button. If I create a printable format, I
cannot get my results to stay without basically calling the Search. If
I have the results and go do a file -> Send -> Page by E-mail, what gets
displayed in the e-mail is the original page that loaded with the
validators showing the text that would be displayed if they were
violated.

The following is a short/sweet version of what I would need but cannot
reproduce.

a) Construct a page URL that is guaranteed to produce the same page
you're currently on, so that you can then scrape that URL for the
contents of an email/print page=20

or

b) Capture the output of the current page's HTML just before it is sent
across the wire and hold it somewhere (session, cache, database,
whatever) so that it is available to send in an email or format for
printing.

| [aspngescalate] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngescalate.asp =3D JOIN/QUIT

Reply to this message...
 
 




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com