上传简历的asp.net代码,仅限300kb ... [英] asp.net code for upload resume with size 300kb only...

查看:101
本文介绍了上传简历的asp.net代码,仅限300kb ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





有谁知道这个?



asp.net代码上传简历大小仅300kb ...&resume数据类型是varbinary(MAX)....



anyone know this?

asp.net code for upload resume with size 300kb only...& resume datatype is varbinary(MAX)....

推荐答案

亲爱的朋友,



请点击链接: -



http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx [ ^ ]



设置Web.config以允许ASP .NET应用程序上载大文件 [ ^ ]



http://www.webdavsystem.com/server/documentation/upload [ ^ ]



我希望这会对你有所帮助。如果真的帮助你,请不要忘记将此标记为您的答案。
Dear Friend,

Please follow the links:-

http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx[^]

Setting up Web.config to allow uploading of large files by ASP .NET applications[^]

http://www.webdavsystem.com/server/documentation/upload[^]

I hope this will help you. Don't forget to mark this as your answer if it really helps you out.


您必须将请求长度更新为web.config。



更新你的web.config,如下所示,更新web.config后你可以上传文件高达2GB



you have to update request length into web.config.

update your web.config as below, after updating web.config you are allow to upload file upto 2GB

<system.web>

<httpruntime executiontimeout="2400" maxrequestlength="40960" />

</system.web> 


在您的aspx页面中添加以下html内容

Add below html content in your aspx page
<asp:FileUpload id="FileUploadControl" runat="server" />
    <asp:Button runat="server" id="btnUpload" text="Upload" onclick="btnUpload_Click" />







protected void btnUpload_Click(object sender, EventArgs e)

{

    if(FileUploadControl.HasFile)

    {

        try

        {

            string filename = Path.GetFileName(FileUploadControl.FileName);

            FileUploadControl.SaveAs(Server.MapPath("~/") + filename);

        }

        catch(Exception ex)

        {

            //write error handling code

        }

    }

}


这篇关于上传简历的asp.net代码,仅限300kb ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆