You're going about this the wrong way; returning nothing in response to the
POST is just going to leave the user with a blank page in their browser.
If you need to post data without changing the page, either use an IFRAME (or
whatever partial-page wrappers ASPNET provides) or use the XMLHTTP object.
--
Thanks,
Eric Lawrence
Program Manager
Assistance and Worldwide Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mad Scientist Jr" <us*************@yahoo.com> wrote in message
news:7a**************************@posting.google.c om...
How do you get a ASP.NET page to return nothing, so the page posting
form data to it doesn't reload?
I have tried all combinations of the following:
Response.SuppressContent = True
Response.BufferOutput = True
Response.Cache.SetNoStore()
[code to save request.form data here]
.
.
.
Response.ClearContent()
Response.ClearHeaders()
Response.Clear()
'Response.ContentType = "text/html"
'Response.AddHeader("Content-Type", "text/html")
'Response.AddHeader("Status", "204")
Response.Flush()
Response.SuppressContent = True
Response.Close()
and it still returns a blank page.
Any ideas? There has GOT to be a way.
Many thanks in advance.
-----
Message 2 in thread
From: VK (sc**********@yahoo.com)
Subject: Re: post data without reloading the page
View this article only
Newsgroups: comp.lang.javascript
Date: 2002-04-16 15:27:57 PST
Option 1 (client side)
Redirect server output to another frame:
<form action="YourCGIScript" target="FrameName">
Option 2 (server side)
Process form data as usual, but instead of HTML send to client
response code
204 (No Response):
print "Content-Type: text/html\n";
print "Status: 204\n\n";
It will instruct the client to stay in the same document view.