Solved

ASP : Request.ServerVariables

Posted on 1998-10-02
5
167 Views
Last Modified: 2013-12-25
Can someone tell me the equivalent of the Request.ServerVariables("QUERY_STRING") with the POST method ?
0
Comment
Question by:netf_ds
  • 2
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 50 total points
ID: 1855412
Request.Form("fieldname")
0
 
LVL 28

Expert Comment

by:sybe
ID: 1855413
In fact there is not a real equivalent for that, but you can display the form values by:

Response.write Request.Form

and access each formvalue individually by

Request.Form("fieldname")

If you want them all to be written out, then use this:


<TABLE BORDER=1 WIDTH=100%>

<TR>
      <TH COLSPAN=2> Form Data</TH>
</TR>

<TR>
  <TD><B>Name</B></TD>
  <TD><B>Value</B></TD>
</TR>
  <% For Each name In Request.Form %>
<TR>
  <TD> <%= name %> </TD>
  <TD> <%= Request.Form(name) %> </TD>
</TR>

<% Next %>
</TABLE>



0
 

Author Comment

by:netf_ds
ID: 1855414
Are you sure there is no equivalent ???

I heard about it, but I doesn't find it anymore.
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1855415
Sybe is correct about the no equivilance, but you can list all the form variables using this code:

<h3>Form</h3>
<% For Each Key In Request.Form %>
  <% = Key %> = <% = Request.Form(Key) %><BR>
<% Next %>
<hr>
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1855416
Sybe is correct about the no equivilance, but you can list all the form variables using this code:

<h3>Form</h3>
<% For Each Key In Request.Form %>
  <% = Key %> = <% = Request.Form(Key) %><BR>
<% Next %>
<hr>
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question