Linking imges in Monorail

30Nov08

A quick one 

Say you have an image or god knows what and  you need to add a link to it, in html you ll do something like

<a href="http://foo.bar/something.html">
<img src="..." /> </a>

in a view you can do this

<a href=$UrlHelper.For("%{ controller='product'}")>  
    <img src="$!Image.Path" alt="$!Name" />
</a>
Advertisements


No Responses Yet to “Linking imges in Monorail”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: