View Full Version : Exclude specific form types when using Request.Form.Count
11-15-2007, 07:16 PM
Is it possible when counting form elements using Request.Form.Count to exclude certain types? (i.e. hidden, submit)
If not, does anyone have any suggestions on how I could achieve this using a different method?
11-15-2007, 08:54 PM
unfortunately the HTTP protocol does not allow the identification of the type of the input that resulted in a particular posted value
11-16-2007, 07:41 AM
The only way to do this is exclude cetain input types based on their names.
Use prefixes for different input types. Loop through all the form elements and count the input types you want in the list.
11-19-2007, 11:32 AM
if submit a form by get or post all the object in the form will be loaded
so only way to exclude is to make loop in all object and applay filter like below
For i= 1 To Request.Form("FormName").Count
if Request.Form("Formname")(item)<>"FldName" then count =count+1
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.