本人今天碰到神经了。写了个提交表单,提交时候发现超过100K提交既然会出错
晕。。
具体错误对象是:
错误 'ASP 0107 : 80004005' 堆栈溢出
处理中的数据超过允许的极限。
错误 'ASP 0107 : 80020009'
发生意外
下面是我找到的最好的解决方法
这是前台代码
__________________________________
<FORM method=post action=LargePost.asp name=theForm οnsubmit="BreakItUp()">
<Textarea rows=3 cols=100 name=BigTextArea>A 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>
____________________________________________________________________________________
ASP接收处!
<%
Dim BigTextArea
For I = 1 To Request.Form("BigTextArea").Count
BigTextArea = BigTextArea & Request.Form("BigTextArea")(I)
Next
%>
终于解决啦。。看你还牛。。