TropicalSky
TropicalSky
CC#
Created by TropicalSky on 11/19/2024 in #help
✅ ASP.NET CORE Web Application
I am using ASP.NET CORE in my web application and when I am trying to upload a file to an input field even if I don't upload a file and just click the upload button my iis express server just crashes does anyone have any idea?
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="JobName" class="control-label">Job Name</label>
<input asp-for="JobName" class="form-control" />
<span asp-validation-for="JobName" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="JobDescription" class="control-label">Job Description</label>
<input asp-for="JobDescription" class="form-control" />
<span asp-validation-for="JobDescription" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="JobStatus" class="control-label">Job Status</label>
<input asp-for="JobStatus" class="form-control" />
<span asp-validation-for="JobStatus" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Invoice" class="control-label"></label>
<input asp-for="Invoice" class="form-control" type="file" accept=".pdf" />
</div>
<div class="form-group">
<label asp-for="Customer" class="control-label"></label>
<input asp-for="Customer" class="form-control" />
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="JobName" class="control-label">Job Name</label>
<input asp-for="JobName" class="form-control" />
<span asp-validation-for="JobName" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="JobDescription" class="control-label">Job Description</label>
<input asp-for="JobDescription" class="form-control" />
<span asp-validation-for="JobDescription" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="JobStatus" class="control-label">Job Status</label>
<input asp-for="JobStatus" class="form-control" />
<span asp-validation-for="JobStatus" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Invoice" class="control-label"></label>
<input asp-for="Invoice" class="form-control" type="file" accept=".pdf" />
</div>
<div class="form-group">
<label asp-for="Customer" class="control-label"></label>
<input asp-for="Customer" class="form-control" />
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
</div>
</div>
27 replies