频道直达 - 学院 - 下载 - 交易 - 特效 - 字库 - 手册 -排名-工具- 繁體
网页教学网站开发 设为首页
加入收藏
联系我们
建站搜索: 常用广告代码   用户注册 | 用户登陆
您当前的位置:中国建站之家 -> 网站开发设计技术教程 -> asp教程 -> 怎样传送更多的数据在表单中

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

作者:未知  来源:转载  发布时间:2005-7-28 14:26:19  发布人:acx

减小字体 增大字体

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=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>
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
%>

将本文收藏到QQ书签与更多好友分享
[打 印]
[] [返回上一页] [收 藏]
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
精彩推荐
热门文章
· 注册码大全二
· 注册码大全四
· 注册码大全一
· 要10G免费网络硬盘的请进..
· 通过google 赶快来赚美金..
· 注册码大全十
· 头像-qq头像(qq新头像)4..
· 让你轻松架设FTP服务器1..
· 注册码大全三
· 梦幻背景图片7
· 卡通动物图片6
· 网页制作素材-按钮素材2..
· 让你轻松架设FTP服务器5..
· 风景图片8
· 注册码大全九
· 让你轻松架设FTP服务器2..
关注此文读者还看过
· Photoshop照片美容揭密 ..
· 从ASP迁移至ASP+--处理会..
· Javascript实现的自动验..
· 跟我学XSL(二)
· Web2.0为何在中国水土不..
· 用PHOTOSHOP制作MM的艺术..
· 轻松解决MYSQL数据库连接..
· ASP编程入门进阶(四):..
· 谷歌CEO施密特明日访华
· ASP环境下邮件列表功能的..
· 服务器安全配置清单!续
· photoshop 与 intuos2 应..
· 浅谈PHP语法(3)
· Flash层的运用(一)
· 提高ASP页面的执行效率(..
· 浅谈Google AdSense Pin..
相关文章
· 如何在表单中改字体的颜色?..
· 在表单中动态增加文本框
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 人才招聘
网站合作、内容监督、商务咨询:QQ: 9576619
Copyright ? 2005--2008 中国建站之家版权所有
粤ICP备05092265号