Answer the question
In order to leave comments, you need to log in
Сshtml displays code on the page how to fix it?
here is the code
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="https://localhost:44367/favicon">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>ULIESER</title>
</head>
<body>
<h2>Выберите файл для загрузки</h2>
<form action="api/photo.Upload" method="post" enctype="multipart/form-data">
<input type="text" name="id" /><br>
<input type="file" name="uploads" /><br>
<input type="submit" value="Загрузить" />
</form>
<br>
<br>
<h2>Выберите файл для просмотра</h2>
<form action="api/photo.GetById" method="post" enctype="multipart/form-data">
<input type="text" name="id" /><br>
<input type="submit" value="Загрузить" />
</form>
<br>
<br>
<h2>Все файлы</h2>
<br>
@{
string[] files = Directory.GetFiles($"{Directory.GetCurrentDirectory()}/uploads");
}
@foreach (string file in files)
{
<p>@file</p>
<br>
}
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question