Avatar of dpicco
dpicco
Flag 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:
http://dev.corp.com/image%20maintenance/image_app.asp?name=index.htm

Open in new window

Thanks.
ASPWeb Development

Avatar of undefined
Last Comment
dpicco

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Wayne Barron

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
dpicco

ASKER
Carrzkiss,

thanks. That is working. OK, so I don't know much about classic asp. I code in asp.net 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 !
Wayne Barron

Take a look at the following example.
http://ee.cffcs.com/Q_24801116/Q_24801116.asp
code
http://ee.cffcs.com/Q_24801116/Q_24801116.zip

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
Carrzkiss
dpicco

ASKER
Thanks!
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23