Hi Mark,
As for the two questions you mentioned, here are my understandings:
1. The ContentType is used to speicfy the mime type of the response stream.
When we don't set it , its the original value (text/html) for the aspx
page. So it'll display as html and omit those "tab" even line break flag.
And as for the text file, I think the correct ContentType should be
"text/plain" rather than "plain/text", and the "plain/text" may not be
recognized by the client browser so that it open it outside the browser via
other text editors. Please try changing the contenttype to "text/plain" and
see whether it works.
2. When we hit "back" button, the browser will retrieve the previous url
stored in the history list and load it.(normally from the client cache).
And generally, when we hit a button on asp.net page, it postback and
reutrn, then the original url(before postback) is added into history list(
you can push the dropdown button beside the "back" button to view the
history list). However, as for your situation, when you post back, and
return a txt data stream rather than text/html, then the original html
document still remain( didn't reload). So it is not added into history
list, thus the "back" button won't work (not history item stored for the
previous page ).
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx