用于上传图像的C#代码 [英] C# Code to upload an image

查看:59
本文介绍了用于上传图像的C#代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i尝试从管理员端上传文件,我尝试使用代码项目中提供的代码实现它但我在做的时候感到有些困难这个。我只想使用简单的代码上传图像。请帮助......

Hi,

i tried to upload a file from Admin end, i tried to implement it using a code given in the Code Project but I feel some difficulty while doing this. I just want to upload an image using a simple code. please helps......

推荐答案

不要在快速答案下发布 - 如果你从一篇文章中得到了代码,那么就有一个新的消息该文章底部的按钮,导致将电子邮件发送给作者。然后他们会被提醒您希望与他们交谈。

在此发布此信息依赖于他们匆匆而过并意识到这是适合他们的。
Don''t post this under Quick Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.


if (FileUpload1.PostedFile.ContentLength != 0)
     {
         string temp = Server.MapPath(@"images\";);
         string path = temp + "hemant.jpg";
         FileUpload1.SaveAs(path);
      }







详细帮助

开发者博客 [ ^ ]

Hemant Singh Rautela




For Detail Help
Develoeprs Blog[^]
Hemant Singh Rautela


嘿,请参阅下面的链接。

链接1 [ ^ ]

Link 2 [ ^ ]

链接3 [ ^ ]
hey refer below links.
Link 1[^]
Link 2[^]
Link 3[^]


这篇关于用于上传图像的C#代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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