D
D
Dmitry2019-02-20 11:25:08
HTML
Dmitry, 2019-02-20 11:25:08

How to make a carousel for a site that will cycle through all the images from the server's local folder?

a carousel is needed for the site, which will cycle through all the images from the server's local folder, in the controller, as I understand it, you need to receive a list and pass it, for example, to ViewBag or ViewData, and in the CSHTML page, receive and display it in a cycle, but even one cannot be displayed image in this way: - the value is passed, but there is no picture <img src="@ViewData["ScrinPath"]" />

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
QSandrew, 2019-02-22
@QSandrew

<img src='@ViewData["ScrinPath"]' />
Try to use single quotes, the problem is that you don't escape double quotes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question