In my table i have: id, header, centent and foto columns. In foto column are cells included string values for egxample :(foto1.jpg,foto2.jpg). J split this and the result input to table. I'm trying to view this in Details.aspx. I must view one record from table in my database plus one split cell as links. View the hole record is not the problem but this fotos..it is. Adding new foto do table must be dynamic: cell before:(foto1.jpg,foto2.jpg), cell after (foto1.jpg,foto2.jpg,foto3.jpg) plus the jpg file in folder with fotos. The View of Details must render dynamically. Sory for my eanglish. Help me, thenk you!
views:
87answers:
1
Q:
need solution for split cell value (string) and view this as link in VIEW in ASP.NET MVC 1 project
+1
A:
if Photos is your field with links:
<% foreach(var link in Photos.Split(',')) {%>
<a href="<%= link %>">link</a>
<% } %>
Alexander Taran
2009-12-22 22:35:14
thank you very much !! I consider why i do not hit on this idea, to do split in View, i tried do this in controler and send to view . Thank one more time and Merry Christmas!
2009-12-23 11:09:37