Data when a form sends a large amount of data, an error occurs. Check out MSDN to learn that the reason is that Microsoft has a limit on the maximum data that can be received with Request.Form (), 80K bytes in IIS4, and 100K bytes in IIS5.
Here are some of the solutions offered by Microsoft:
1, using Request.BinaryRead instead of Request.Form method to analyze form data;
2, the use of File upload scheme, such as: Microsoft Posting acceptor;
3. Because the 102399-byte limit is for each form element, it is submitted by separating the form element content greater than 102399 into multiple table cells.
Here is the sample code: (Microsoft Reminder: The following code does not necessarily fully apply to specific needs, not the consequences of using these code is responsible!) )
<form method=post action=largepost.asp name=theform onsubmit= "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.
If the content has Chinese characters, it can be set to: 51100
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>
Accept data page main code:
<%
Dim Bigtextarea
For I = 1 to Request.Form ("Bigtextarea"). Count
Bigtextarea = Bigtextarea & Request.Form ("Bigtextarea") (I)
Next
%>