0

I've got a piece of tracking code which is capturing REMOTE_HOST, SERVER, REQUEST_METHOD, SCRIPT_NAME and QUERY_STRING. It grabs these from ServerVariables and sticks them in a database by user and IP.

What is the best way to pick up the exact contents of what was posted back to a URL in ASP.NET? Is there an HTTP_POST? I'd rather not grab something and then have to parse it.

Snake Eyes
  • 16,287
  • 34
  • 113
  • 221
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466

1 Answers1

2

If I understand you correctly, you are talking about something like the Request.Form collection.

It's a NameValueCollection object with all the POST-ed data.

Edit:

More information here: http://msdn.microsoft.com/en-us/library/ms525985.aspx

HaukurHaf
  • 13,522
  • 5
  • 44
  • 59
  • Can you get to this from the Global.asax's _BeginRequest? Has Request.Form been instantiated yet? Had an issue yesterday going for Session["user"] because Session isn't available yet in the request cycle. – BuddyJoe Mar 19 '10 at 13:44
  • I'm not sure about that one ... sorry. Just try it, see what happens :-) – HaukurHaf Mar 21 '10 at 00:12