Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Sep 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclude specific form types when using Request.Form.Count

    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?

    Thanks,

    Matt

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    unfortunately the HTTP protocol does not allow the identification of the type of the input that resulted in a particular posted value
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    Regular Coder
    Join Date
    Sep 2007
    Posts
    120
    Thanks
    0
    Thanked 3 Times in 3 Posts
    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.

    HTH, Tom

  • #4
    Regular Coder
    Join Date
    Nov 2007
    Posts
    110
    Thanks
    0
    Thanked 1 Time in 1 Post
    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
    Next


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •