[RESOLVED]Help with hyperlink

Hello,

Am reading items in a database query into a div..

foreach (var r in Read){

<div>kjsdsdjskdjsk <a href="@r.Name .cshtml"> </div>

}

What i need to solve is i need to put the .cshmtl extension at the end of the @r.Name but it shows error saying there isn’t a column with such name from the db.. I need the extension attached to it.. OR do i create a new column in the db to handle this

Give this ago..

foreach (var r in Read){

<div><a href="@Href("" + r.Name + ".cshtml")">something to link it</a></div>

}

Let me know if that works..

Cheers!

Leave a Reply