Showing Parameters via the Params Collection in ASP.NET : Request « Page Lifecycle « ASP.NET Tutorial






<html>
   <head>
      <title>Submit a named parameter via POST</title>
   </head>
<body>

   <form id="form1" action="NextPage.aspx" method="POST">
      <h3>Name:</h3>
      <input type="text" name="name">
      <input type="submit">
   </form>

</body>
</html>

File: NextPage.aspx

<%@ Page Language="vb" %>
<html>
   <head>
      <title>Showing Parameters via the Params Collection in ASP.NET</title>
   </head>
<body>


<%
Dim Counter1, Counter2 As Integer
Dim Keys(), subKeys() As String
Dim ParamColl As NameValueCollection


ParamColl=Request.Params

Keys = ParamColl.AllKeys
For Counter1 = 0 To Keys.GetUpperBound(0)
   Response.Write("Key: " & Keys(Counter1) & "<br>")
   subKeys = ParamColl.GetValues(Counter1) ' Get all values under this key.
   For Counter2 = 0 To subKeys.GetUpperBound(0)
      Response.Write("Value " & CStr(Counter2) & ": " & subKeys(Counter2) & "<br>")
   Next Counter2
Next Counter1
%>


</body>
</html>








5.8.Request
5.8.1.Get Request.UserLanguages
5.8.2.Request.UrlReferrer
5.8.3.Request.QueryString
5.8.4.Request.Cookies
5.8.5.Get browser information
5.8.6.Request.ServerVariables
5.8.7.Filtering the HTTP Request body using InputStream
5.8.8.Showing Parameters via the Params Collection in ASP.NET
5.8.9.Getting cookie values
5.8.10.Displaying additional path information in ASP.NET
5.8.11.Showing QueryString values via the QueryString Collection in ASP.NET
5.8.12.Displaying the HTTP headers collection in ASP.NET
5.8.13.Displaying the Request.FilePath property in ASP.NET
5.8.14.Request.Headers