0

I have a form named form-web.asp and the action of the form is web-process.asp. Basically users are accessing the form while adding a name and surname as parameters. ex /form-web.asp?name=tyron&surname=vella . In the web-process.asp I want to get these values.

How I can do this please?

3 Answers 3

3

Use hidden form controls to store the values which you want to forward to web-process.asp:

<%
Dim name, surname
name = Request.QueryString("name")
surname = Request.QueryString("surname")
' Do whatever other input validation you need
%>
<form action="web-process.asp">
<div>
    <input type="hidden" name="name" value="<%= Server.HtmlEncode(name) %>" />
    <input type="hidden" name="surname" value="<%= Server.HtmlEncode(surname) %>" />
</div>
</form>

"Hidden" controls won't be displayed, but will still be submitted with the form.

Sign up to request clarification or add additional context in comments.

1 Comment

You actually noticed something subtle that the other two answerers did not notice, hence the hidden fields in your answer. I'm not 100% sure the OP meant to write the question like he did, but +1 for noticing and answering to that.
1

suppose your URL is

ex/form-web.asp?name=tyron&surname=vella

than try something like this,

Hi, <%=Request.QueryString("name")%> <%= Request.QueryString("age")%>

output

Hi, tyron vella

Comments

1

Request.QueryString is what you are looking for. It returns a value from the querystring.

For example: /form-web.asp?name=tyron&surname=vella

Request.QueryString("name") 

would give you 'tyron'

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.