How do I attach a link (to a View) to an image in ASP.NET MVC?

Posted by Ryan Pitts on Stack Overflow See other posts from Stack Overflow or by Ryan Pitts
Published on 2010-04-16T15:37:02Z Indexed on 2010/04/16 16:03 UTC
Read the original article Hit count: 276

Filed under:
|
|
|
|

Ok, so here is my situation. I am creating a web application using ASP.NET MVC 2 using the C# language. I have programmed in HTML, CSS, and PHP for several years and I am very new to ASP.NET. The part that I am having trouble with is the image gallery.

The setup: I have a link on the navigation bar that goes to a "Galleries" page. This page will show a list of galleries. Each gallery has a title, an image, and a description. All of this information is pulled from an XML file. I'm using the XML file like a database. I wanted to use this method so that i could easily update the list of galleries and have the updated XML file automatically be reflected by the website. Now, the galleries should link to an "Images" page. This page will display a list of images within the gallery based on what gallery was selected. This page will also pull from an XML file.

The problem: I cannot seem to attach a dynamic link to the image? I am also stuck and not sure how to get the correct View to display. I know I need to do something with the controllers and models, right? I have some code if needed? I would greatly appreciate any help or direction for this! Thanks!

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about image