Handling Arrays of HTML Input Elements with Request.Form Like PHP

前端 未结 3 1965
温柔的废话
温柔的废话 2021-01-12 03:28

How can I properly receive these Array of Inputs on asp.net?




        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-12 04:13

    These are not arrays of inputs. HTML doesn't have a concept of arrays.

    These are simply groups of inputs with the same name.

    What are you trying to achieve? Why are you not using server side controls?


    Update:

    You can access the Request.Forms collection - it will hold the posted form elements.

    Alternatively, use server side controls - you will be able to access these by ID.

提交回复
热议问题