In my gallery I show every image in a colorbox. Now I want to make a navigation - add a next button if it isn't the last image and add a previous button if it isn't the first image.
I've tried like this:
if (@Model.Previous() != null) { <a href='/galerien/[email protected]().Id'>previous</a> }
It works but the first image isn't shown, it shows the error 'Cannot perform runtime binding on a null reference'
Next and previous link in gallery
Hello!
In my gallery I show every image in a colorbox. Now I want to make a navigation - add a next button if it isn't the last image and add a previous button if it isn't the first image.
I've tried like this:
if (@Model.Previous() != null) {
<a href='/galerien/[email protected]().Id'>previous</a>
}
It works but the first image isn't shown, it shows the error 'Cannot perform runtime binding on a null reference'
How can I make it work?
Regards,
Kristina
is working on a reply...