我正在向数据库添加日期和图像。我想将日期添加为上传的图像的页脚。在c上传时在图像上添加日期#
HTML图像upload
<div class="form-group">
@Html.Label("Photo", htmlAttributes: new { @class = "control-label" })
<div class="col-md-10">
<img id="DocImg" src="~/Upload/DoctorImage/doc-default.png" style="cursor: pointer;" accesskeyclass="edtImg" width="100" height="100" />
<input type="file" id="fileUpload" name="Photo" accept="image/*" />
</div>
</div>
HTML为datepicker
<div class="col-6">
@Html.ValidationSummary(true, "", new { @class = "text-danger"})
<div class="form-group">
@Html.Label("Joining Date", htmlAttributes: new { @class = "control-label col-md-2", @required = "required" })
<div class="col-md-10">
@(Html.Kendo().DatePicker()
.Name("JoiningDate")
.Value("")
.HtmlAttributes(new { style = "width: 100%", required = "true" })
)
@Html.ValidationMessageFor(model => model.JoiningDate, "", new { @class = "text-danger" })
</div>
</div>
</div>
的脚本上传
$(document).ready(function() {
$("#fileUpload").hide();
});
$("#DocImg").click(function() {
$("#fileUpload").trigger('click');
});
'date as footer'是什么意思? – mplungjan
在一个帖子中发现了这个。 https://stackoverflow.com/questions/1224653/place-watermark-image-on-other-images-c-asp-net是否有帮助? –
在服务器端设置任何文件元数据会更有意义 - 特别是日期。 –