Link to home
Start Free TrialLog in
Avatar of dpicco
dpiccoFlag for United States of America

asked on

how to parse the query string in asp

Hello experts,

I have an asp page like this:

response.write "<form method=post name=add_image action=image_app.asp onsubmit='return error_check()'>"
response.write "<td>Admin</td>"
response.write "<td><input type=text name=file_name size=40></td>"
response.write "<td><input type=text name=sort_order size=3></td>"
response.write "<td><input type=text name=title size=15 maxlength=50></td>"
response.write "<td><input type=text name=comments size=50 maxlength=100></td>"
response.write "</tr></table><p>"
response.write "<input type=hidden name=dept value=Admin>"
response.write "<input type=hidden name=add_record value=yes>"
response.write "<input type=hidden name=update value=no>"
response.write "<input type=hidden name=delete value=no>"
response.write "<input type=submit name=insert value=Submit></form>"%>

Open in new window

How can I parse the query string and put the name variable in the file_name?

My query string looks like this:

Open in new window

Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dpicco



thanks. That is working. OK, so I don't know much about classic asp. I code in and my boss codes in asp and I just try to make everything work together. So, we shouldn't put response.write in front of plain html code? Makes sense to me. But if you want to elaborate, I am happy to pass the info along to my team.

Thank you !
Take a look at the following example.

This will help you to understand ASP Classic a LOT better.
This will also show you how to protect your code as well, which the
Function that I created ProtectSQL, I use in some of my ASP.NET Upload Scripts.

Take Care
Avatar of dpicco