asp.net mvc - Open image in a new window using Razor and javascript -


i'm trying open in new window new full size image each one. i'm using code:

<script type="text/javascript"> function openimage(imageurl) {     window.open(imageurl); } 

@foreach (var image in model.images) {         <img src="@url.action("thumbnail", "done", new { width = 150, height = 150, file = @imagen.filename })" alt="@imagen.filename" onclick="openimage('@url.content(viewbag.path + @imagen.filename)')" /> } 

but using when click on image can't open anything.

can me issue?

thank in advanced

edited function openimage due wrong code

the solution url of directory saved images in way: string url = url.content("~/images");


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -