We know that the method of generating static pages is generally used to use templates. I know this. Now I want to directly save the HTML code generated by the ASP file into a static page. This is very suitable for making the home page. At that time, I looked for content on the Internet and found this: "A method to generate static HTML pages without templates"://www.Vevb.com/html/200609/984.htm. I tried it and it can be done, but when the file is large, an error will occur. What is the reason? Is there any restrictions on the file stored in textarea or other? I searched the Internet repeatedly and posted a post on IECN for help. I tried and tried again and found that there were restrictions on the form. I found the problem of solving the FORM restrictions online.
Here is the repost:
When the amount of data sent by the form is large, an error will be reported. Looking through msdn, it was learned 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 a few solutions provided by Microsoft:
1. Use request.binaryread instead of request.form method to parse form data;
2. Use file upload scheme, such as: microsoft postingacceptor;
3. Since the limit of 102399 bytes is for each form element, when submitting, the form element content greater than 102399 is divided into multiple form elements to submit.
The following is the sample code: (Microsoft reminds: The following code may not be completely applicable to specific needs and will not be responsible for the consequences of using these codes!)
The code copy is as follows:
<formmethod=postaction=largepost.aspname=theformonsubmit="breakitup()">
<textarearows=3cols=100name=bigtextarea>abunchoftext...</textarea>
<inputtype=submitvalue=go>
</form>
<scriptlanguage=javascript>
functionbreakitup()
{
//setthelimitforfieldsize.
//If the content has Chinese characters, it can be set to: 51100
varformlimit=102399
//get the value of thelarge inputobject.
vartempvar=newstring
tempvar=document.theform.bigtextarea.value
//if theelengthoftheobjectisgreaterthanthelimit,breakit
//intomultipleobjects.
if(tempvar.length>formlimit)
{
document.theform.bigtextarea.value=tempvar.substr(0,formlimit)
tempvar=tempvar.substr(formlimit)
while(tempvar.length>0)
{
varobjtextarea=document.createelement("textarea")
objtextarea.name="bigtextarea"
objtextarea.value=tempvar.substr(0,formlimit)
document.theform.appendchild(objtextarea)
tempvar=tempvar.substr(formlimit)