submit form + post data without reloading the page in ASP.NET?

  • Thread starter Thread starter Mad Scientist Jr
  • Start date Start date
M

Mad Scientist Jr

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]
 
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.
 
i got it...

in Page_Load put

Response.Status = "204 No Content" ' don't refresh sender's browser

as the first line
 
Back
Top