3

I'm not certain that this is possible, but I'd like some opinions on if it is, and if so, how I can go about doing it. Essentially I have a form that looks like this in pseudocode. I know it seems ridiculous on the surface to have a grid with 1000 rows, but there's a real purpose. Yes, I have paging, but some users have indicated they want all records on one page.

<form>
    <grid>
        <input type="text" />
        999 or so more rows
    </grid>
</form>

.NET cannot handle 1000 field elements in one http post, so I'm searching for a way to divide the form submission into multiple posts. Separating into multiple grids would not be considered an option. If the consensus is that it isn't possible, that's fine as well.

4

3 回答 3

6

If I'm understanding correctly, there's a bit of history to this, last December (2012) MS released an update for IIS that limited the field count to 1000 form fields on submit.

The fix is to add this to the appSettings config section of your web.config:

<add key="aspnet:MaxHttpCollectionKeys" value="10000" />

That raises the max form fields that can be submitted to 10k, or whatever you need.

于 2013-05-07T21:14:32.090 回答
0

Let go standard tag and try jquery $.post() method. Make some javascript o handle batch posts in a bunch of 1000 rows at a time. If you want the submissions all in one transaction, try creating 3 actions in the server: BeginSubmit, SubmitRows, EndSubmit. On the action EndSubmit, you save everything to the database.

Best regards.

于 2013-05-07T21:59:03.563 回答
-1

If you really have to do it (and I feel your pain), tell your stakeholders that you can't use a Grid. Write your own html table. Tell them that losing the benefits of the Grid (like sorting, command buttons etc.) is the price to pay for that.

于 2013-05-07T20:42:19.737 回答