使用C#上传照片的示例代码? [英] sample code to upload photo using C# ?

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

问题描述

使用C#上传照片的示例代码

sample code to upload photo using C#

推荐答案

参考 - 使用ASP.Net C#从DataBase上传和显示图像 [ ^ ]


访问这里..



如何使用ASP.NET上传图像 [ ^ ]
visit here..

How to upload an image using ASP.NET[^]


在asp.net中你可以尝试这种类型
In asp .net you can try this type
protected void Submit(object sender, EventArgs e)
    {
        if (Path.GetExtension(FileUpload1.FileName) == ".jpg")
        {
            FileUpload1.SaveAs("path of where you save picture");

        }
        else
        {
            Response.Write("<script>alert('Invalid format')</script>");
        }

    }





对于任何查询点击回复..



For any query hit reply..


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

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