选择太多复选框会产生意外错误 [英] Too many Checkboxes selection make Unexpected error

查看:116
本文介绍了选择太多复选框会产生意外错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有1350个城市填写表格作为复选框列表。

我做了..

现在当按下下一个按钮并选择1350之间的几个城市。

它按照程序工作。



但是,如果我选择所有这些以便与所有城市进行下一步那么它就会发生火灾错误。



Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误。从服务器返回的状态代码为:500



而且接下来无法做到。

i搜索了所有相同的内容。

但是找不到合适的。

i在we.config中找到了与Edit相同的变化,但它们对我来说也没有用。

解决方案

< blockquote> 建议



首先,我建议你重新考虑你的设计。

填充1350 <页面上的code> CheckBoxes 不是一个明智的方法。



相反,您可以拥有自动完成文本框,根据搜索文本,您只需填充城市匹配搜索文本。



另一种方法是根据所选的国家/地区缩小城市 >和。你将拥有更少数量的 Cities



使用当前的方法,我会说调试代码并查看代码的确切位置它无法按预期工作。


它正在发生,因为MaxHttpCollectionKeys默认设置为1000并且我增加了

该属性的大小只是通过添加下面是web.config中的代码



 <   add     key   =  aspnet:MaxHttpCollectionKeys    value   =  10000   < span class =code-keyword> /  >  





谢谢大家你好,感谢Tadit Dash。


I have 1350 City to fill in the table as check box list.
and I made it..
Now When press next button with selecting few city among 1350.
it working as per programmed.

but, if i select all of them to make next step with the all city then it's fire error.

" Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 "

and not able to do next.
i searched all over for same.
but couldn't find right one.
i found same change regarding to Edit in we.config, but they also not worked for me.

解决方案

Suggestion

First of all, I would suggest you to reconsider your design.
Populating 1350 CheckBoxes on a page is not a wise approach.

Instead you can have a AutoComplete TextBox and according to the search text, you will just populate the Cities matching that search text.

Another approach would be to narrow down the Cities as per the selected Country and State and District. You will have lesser number of Cities as such.

With the current approach, I would say debug the code and see where exactly in code it is failing to work as expected.


it's happening because of "MaxHttpCollectionKeys" is default set to 1000 and i increased
the size of that attribute just by adding below code in web.config

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



Thank u to all of you, and thanks to Tadit Dash.


这篇关于选择太多复选框会产生意外错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆