Establecer una imagen en la interfaz de usuario

Im using .net c# MVC3 Model. I need to show a gif called loading when I click save on the page. I used <img src="sourcepath" alt="loading" style="display:none"/> and trying to display it whenever user clicks save button using jquery. I have stored the image temporarily in views folder. Unfortunately, i could not see image on the screen. I can see its division with a small red cross cancel button.

Ayuda de Pls

preguntado el 28 de agosto de 12 a las 15:08

You have to add an url to the image in the attribute src, that's why you get an red cross. -

2 Respuestas

If you're seeing the broken image icon, it means your src "sourcepath" is wrong. You would normally put static content in the Content folder of your site, and access it using /Content/imagename.jpg or /Content/Images/imagename.jpg o similar.

Respondido 28 ago 12, 15:08

Try to use the search, here you can find an solution the show an spinner when doing ajax requests:

¿Cómo mostrar la carga de spinner en jQuery?

contestado el 23 de mayo de 17 a las 13:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.