params.aspx 685 B

123456789101112131415161718192021222324252627282930313233
  1. <%@ Page language="c#" AutoEventWireup="true"%>
  2. <html>
  3. <head>
  4. <script runat="server">
  5. void Page_Load (object o, EventArgs e)
  6. {
  7. string s = "";
  8. foreach (string key in HttpContext.Current.Request.Params.AllKeys) {
  9. string[] vals = HttpContext.Current.Request.Params.GetValues (key);
  10. s += key + ": ";
  11. foreach (string val in vals) {
  12. s += val + ",";
  13. }
  14. s += "<br/>\n";
  15. }
  16. foo.Text = s;
  17. HttpContext.Current.Response.Cookies ["blah"].Expires = DateTime.Now.AddMinutes(15);
  18. HttpContext.Current.Response.Cookies ["blah"].Value = Guid.NewGuid ().ToString ();
  19. }
  20. </script>
  21. </head>
  22. <body>
  23. <asp:Label id="foo" runat="server"/>
  24. </body>
  25. </html>