怎样传送更多的数据在表单中

2016-01-29 18:29 5 1 收藏

怎样传送更多的数据在表单中,怎样传送更多的数据在表单中

【 tulaoshi.com - ASP 】

  request对象限制102,399 bytes..
When you post a large form field, you may receive the following error message:

Error Type:
Request object, ASP 0107 (0x80004005)
The data being processed is over the allowed limit.

In Microsoft Internet Information Server (IIS) 4.0, you may receive the following error message:
Request object error 'ASP 0107 : 80004005'
Stack Overflow
/projectname/page.asp, line XX
The data being processed is over the allowed limit.


CAUSE
The size limit of each form field that is retrieved in the Request object is 102,399 bytes. The error
occurs when you exceed this limit.


RESOLUTION
To resolve this problem, use one of the following methods:

Instead of reading form variable values with the Request.Form collection, use Request.BinaryRead
(Request.TotalBytes), and parse the form values from the output of Request.BinaryRead.


Use a File Upload scheme, such as Microsoft Posting Acceptor.


Break the HTML form variables into multiple form variables before you submit the form. The 102,399 byte
limit is for each form variable, so you can have multiple form variables of 102,399 characters or less.
The following sample code illustrates this:
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this
code "as is" without warranty of any kind, either express or implied, including but not limited to the
implied warranties of merchantability and/or fitness for a particular purpose.

<FORM method=post action=LargePost.asp name=theForm onsubmit="BreakItUp()"
<Textarea rows=3 cols=100 name=BigTextAreaA bunch of text...</Textarea
<input type=submit value=go
</form

<SCRIPT Language=JavaScript
function BreakItUp()
{
//Set the limit for field size.
var FormLimit = 102399

//Get the value of the large input object.
var TempVar = new String
TempVar = document.theForm.BigTextArea.value

//If the length of the object is greater than the limit, break it
//into multiple objects.
if (TempVar.length FormLimit)
{
document.theForm.BigTextArea.value = TempVar.substr(0, FormLimit)
TempVar = TempVar.substr(FormLimit)

while (TempVar.length 0)
{
var objTEXTAREA = document.createElement("TEXTAREA")
objTEXTAREA.name = "BigTextArea"
objTEXTAREA.value = TempVar.substr(0, FormLimit)
document.theForm.appendChild(objTEXTAREA)

TempVar = TempVar.substr(FormLimit)
}
}
}
</SCRIPT
The receiving Active Server Page (ASP) page reconstructs the variable:
<%
Dim BigTextArea

For I = 1 To Request.Form("BigTextArea").Count
BigTextArea = BigTextArea & Request.Form("BigTextArea")(I)
Next
%
 

来源:http://www.tulaoshi.com/n/20160129/1505999.html

延伸阅读
标签: Web开发
    今天有朋友问我关于用JAVASCRIPT来进行页面各表单之间的数据传递的问题,我以前也写过,不过从来没有注意,今天总结了一下,希望能够给大家一些帮助,也帮助我总结以前学过,用过的知识。     一,最简单的就是同一个网页里的表单的数据传递。 举个实例,一个网页上有两个表单,每个表单里一个文本框...
标签: 办公软件
不知道大家有没有这样的感觉,当你查看Excel数据表中某行记录时,由于数据表中的字段较多,需要拖动水平滚动条才能将整个表格的内容看完,这样很容易“看走眼”,不小心就会将上面一行或下面一行的内容错看成当前记录的数据。这样的数据交给领导,可是要挨批噢,其实通过下面的几行VBA代码,你就可以轻轻松松地查看记录了,操作步骤如下: ...
标签: 办公软件
    近日,校长交给我一个麻烦的任务:将全校两千多名学生的学籍信息录入到office 2000中作为资料保存。硬着头皮输了二十来个人,就遇到两个麻烦:一是要在单元格之间不断切换输入法,影响输入速度;二是输入的学号前面部分都是zjsx(“枝江市实验小学”的拼音字头),重复输入令人厌烦,而且容易出错。常言道:“磨刀不误砍柴工...
标签: Web开发
代码如下: % For Each x In Request.Form % Request.Form( %= x % ) = %= Request.Form(x) % BR % Next % 或 % For i = 1 To Request.Form("inputname").Count   Response.Write Request.Form("input...
    为了测试我的一个业务系统在不同数据库上的表现,我的tomcat上配置了多个数据源,这样我可以轻松的切换系统到不同的数据源上。为了监测每个数据源的运行状况,随时观测执行的sql语句,我为每个数据源都配置了JDBMonitor,并且这些数据源的JDBMonitor的配置文件共用一个config.xml文件。     但是在...

经验教程

460

收藏

61
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部