What are the data type limitations of the POST and

2019-06-28 01:35发布

What are the data type limitations of the POST and GET HTML Form Methods? Are you limited to passing only specific data types like--strings, integers, floats.

2条回答
我欲成王,谁敢阻挡
2楼-- · 2019-06-28 02:11

Of what I'm aware, there's no data type limitations, but there's another limitation. GET has a maximum length that varies between browsers. As a general rule, I use POST for form submissions that doesn't require that the user should be able to bookmark or send the URL to someone.

查看更多
老娘就宠你
3楼-- · 2019-06-28 02:30

POST and GET both submit strings to the server. It is up to your program to determine how to parse that data. Most frameworks give you a basis to do this already that support most primitive datatypes. In the case of ASP.NET MVC, it can bind to most objects.

查看更多
登录 后发表回答