Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Request.Form to Array

Request.Form to Array

Scheduled Pinned Locked Moved C#
data-structuresquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    keyboard warrior
    wrote on last edited by
    #1

    ArrayList temp = new ArrayList(); foreach (string var in Request.Form) { temp.Add(var); } This is the code I'm using to pull out the items in my form. However, I cannot seem to get the values of the data entered into the form. I'm just getting the names of all the objects in the form, but I really want the data as well. Am I missing something? :confused:

    ----------------------------------------------------------- Completion Deadline: two days before the day after tomorrow

    N 1 Reply Last reply
    0
    • K keyboard warrior

      ArrayList temp = new ArrayList(); foreach (string var in Request.Form) { temp.Add(var); } This is the code I'm using to pull out the items in my form. However, I cannot seem to get the values of the data entered into the form. I'm just getting the names of all the objects in the form, but I really want the data as well. Am I missing something? :confused:

      ----------------------------------------------------------- Completion Deadline: two days before the day after tomorrow

      N Offline
      N Offline
      NaNg15241
      wrote on last edited by
      #2

      Request.Form returns NameValueCollection. you should do this: foreach (String var in Request.Form.Keys) temp.Add(Request.Form[var]); Hope I helped. :)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups