我想使用 C# 在我的 Visual Studio 中的 Web 应用程序中添加一个文件上传按钮,以便允许用户在他的 PC 上浏览图片以将其保存在数据库中。就像您在发送电子邮件时想要附加文件一样。
如何向我的网站添加文件上传按钮?
请您参考如下方法:
有点像
<form method="post" enctype="multipart/form-data" action="http://example.com">
<p>
Please specify a file:<br>
<input type="file" name="myfile">
</p>
<div><input type="submit" value="Send"></div>
</form>
