Subject: Passing parameters between 2 asp files
Posted By: spraveens Post Date: 9/17/2003 7:22:18 AM
Hello !! My Problem goes like this :

Consider 2 files test1.asp and test2.asp , now  using forms we pass a parameter param1 from test1.asp to test2.asp where we receive it using command request.form("param1"), now I need to pass another parameter param2 from test1.asp to test2.asp with out using forms, Iam unable to pass both the parameters at the same time as one parameter is passed using forms (on clicking the submit button) and the other parameter is to be passed with out the use of forms.How do I do it ?
Thank You
Praveen

Reply By: mtuppers Reply Date: 9/20/2003 2:47:52 PM
Not to clear but...

If the param2 does not need by input, you can put the param2 in
<form action=test2.asp?param2=">

So when ever you got the the next page, you can using request.querry("param2") to got information.

Reply By: Cos Reply Date: 9/22/2003 7:51:59 AM
Not very clear indeed, but if I understood well, you wanna pass 2 parameters at the time.

This is done like this:

<form action=test2.asp?param1=value1&param2=value2">

but if you are using already a form, why do you need parameters? Use hidden fields! It's cleaner :)


Linux is like a wigwam : no windows, no gates, apache inside.
Reply By: DaveGerard Reply Date: 9/23/2003 2:49:37 PM
Cos is right. If "Submit" is the only way to get to test2.asp then you're best bet is using a hidden field for Param2.

<input type="hidden" name="Param2" value="<%=Param2%>">


Go to topic 1172

Return to index page 1040
Return to index page 1039
Return to index page 1038
Return to index page 1037
Return to index page 1036
Return to index page 1035
Return to index page 1034
Return to index page 1033
Return to index page 1032
Return to index page 1031