I have a column with link that i want to make them clicable with some text.
When i click the grid, then columns, and select the colum in the template section i write this:
" < a href="@(data.nameofcolumn)"> link text "
All is good, but the link is redirecting to http://localhost:5000/data.nameofcolumn. Is there a way to be directly to nameofcolumn? am i doing something wrong?
Yes, but when i put @data.City in my href it load localhoast:5000/data.City, not just data.city. In that case if i put @data.City as google.com, then when i click the link it redirects me to localhoast:5000/google.com, not google.com.
I see. The link href is relative to the application root if you have not specified schema for your url. You need: <a href="http://google.com">Go to Google</a>
<a href="google.com">Go to Google</a> will not work since the browser will assume that this is link relative to the current root.
Yes, this was the problem. Thank you very much.
So now i have put < a href="http://@(data.Link)">Link and its all good. Maybe change of documentation, or did i just missed that somewhere ?