Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 8th, 2004, 03:23 PM
Authorized User
 
Join Date: Aug 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Default querystring and form collections at the same time

Is anyone aware of any issues using both the form and querystring collections simultaneously? Is it bad programming practice to do the following:

some html doc
<form action="test.asp?test=darin" method="post">
<input type="hidden" name="hideme" value="yup" />
<input type="text" name="fname" />

<input type="submit" name="submit" />
</form>

test.asp
if CStr(strFormName) = "feedback" then
  'statement sequence.
else if CStr(strFormName) = "techsupport" then
  'statement sequence.
end if


I'm interested in the querystring being passed in the action attribute while method="post" as well as using a hidden input using method="post". I'm having no trouble running the code but have found myself in a spat with another coder concerning the simultaneous use of querystring and form as well as using post with a hidden input. Is it documented that this is syntactically incorrect?
 
Old April 5th, 2004, 11:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I haven't read anything against using them both simultaneously. But I wonder why you will have to use both together. May be you are interested in handling both at the same time.;) Still it depends upon the requirement and the approach towards it.

I would(not only me, but everyone would) suggest you for using one at a time to avoid confusion while programming, depending upon the security of the data you are willing to pass through different pages for processing. If there is not any necessity to have the data hidden from the user, one can go for Querystring usage, and anything needs to be hidden from users view(not showing up on the URL part) form processing is the right choice. Again, it fits to the requirement and situation.

As I am the one who use to play with Querystring values and try and see if I can find flaws in the way the page can process the data, I would not suggest you to go for querystrings for anything that deals data with seriousness.

Still you can get more views on this as it differs from person to person on approach.

Happy programming.

Cheers!

-Vijay G





Similar Threads
Thread Thread Starter Forum Replies Last Post
collections help bennyt BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 July 26th, 2008 01:30 AM
Submit Form with QueryString Data Phil06 Javascript 4 June 15th, 2007 06:11 PM
Request.Form / Request.QueryString Toran Classic ASP Databases 4 January 17th, 2007 02:23 PM
Collections in C#? shenku C# 1 August 17th, 2005 06:16 AM
request.querystring() , request.form() alyeng2000 ASP.NET 1.0 and 1.1 Basics 1 December 30th, 2003 12:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.