开发者

how to have multiple links on image using mvc

I have got an image , so when the top portion of image is clicked , it should got to certain url and when the bottom portion of image is clicked it should go to other website, I know how to do this with html area tag , but i dont know how to acheive this in mvc 3. Any help will be highly appreciated.

Edited:

<img src="/content/images/content/Insurance-Graphic.jpg" alt="Trackday insurance" usemap="#insurancemap" />
        <map name="insurancemap">
          <area shape="rect" coords="0,0,275,140" alt="TrackDay Insurance" href="http://www.competition-car-insurance.co.uk/form_track_day.htm" target="_blank" />
          <area shape="rect" coords="275,140,0,0" alt="Reis Insurance" href="http://www.reis.co.uk开发者_C百科" target="_blank" />

        </map>

The above code works:)


mvc gives you full control of the html rendering. you can include your html area in the view. you can pass the of the image and the url's for the html area to the view using the controller, when they are dynamic.

hope that helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜