简体   繁体   English

如何获取超过1000个html控件值的HttpContext.Current.Request?

[英]how can i get HttpContext.Current.Request of more than 1000 html controls value?

I have more than 1000 controls in a html web page. 我在HTML网页中有1000多个控件。 when i submit the page i get only values of 1000 controls 当我提交页面时,我只能得到1000个控件的值

NameValueCollection nv = (NameValueCollection) HttpContext.Current.Request.Form

nv.count is 1000 , how can i get HttpContext.Current.Request of more than 1000 html controls value ? nv.count是1000,如何获取超过1000个html控件值的HttpContext.Current.Request?

Your webserver has a limit on how large requests it will allow. 您的网络服务器对允许的请求数量有限制。

If you are using IIS you can check out http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits 如果您使用的是IIS,则可以查看http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits

But i would suggest using some other technique to post your data, maybe AJAX 但我建议您使用其他技术来发布您的数据,也许是AJAX

What the - how can you sensibly have 1000+ input controls? 什么-您如何明智地拥有1000多个输入控件? Smells like "one page to rule them all". 闻起来像“用一页纸统治一切”。 THAT is your problem. 那是你的问题。 You wont get around that - likely the browser does not publish them. 您将无法解决这个问题-可能是浏览器未发布它们。 Your best bet i not to submit a webpage, but to use AJAX and construct some JSON payload with all the values. 您最好不要提交网页,而要使用AJAX并使用所有值构造一些JSON有效负载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以使用动态重定向HttpContext.Current.Request吗? - can I use dynamic to redirect HttpContext.Current.Request? 我想在我的Windows窗体中包含HttpContext.Current.Request - I want to include HttpContext.Current.Request in my windows forms 生产中的HttpContext.Current.Request为null - HttpContext.Current.Request null in production 在HttpContext.Current.Request中模拟ServerVariables - Mock ServerVariables in the HttpContext.Current.Request HttpContext.Request或HttpContext.Current.Request URL中是否缺少“#”字母? - '#' letter is missing in HttpContext.Request or HttpContext.Current.Request url? C#使用HttpContext.Current.Request在移动浏览器上请求时无法获取QueryString e - C# Use HttpContext.Current.Request Cannot get QueryString e when requested on mobile browser HttpControllerContext.Request和HttpContext.Current.Request之间的区别 - Difference between HttpControllerContext.Request and HttpContext.Current.Request HttpContext.Current.Request和Page.Request中的Url.Host - Url.Host in HttpContext.Current.Request and Page.Request 带有Angular UI路由器的HttpContext.Current.Request - HttpContext.Current.Request with Angular ui-router 什么HttpContext.Current.Request [“ CarName”]!= null,它在做什么? - what HttpContext.Current.Request[“CarName”] != null, what it is doing?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM