Ret ASP til .NET C#
Hej.Jeg er igang med en tagwall. Jeg vil godt have når man laver en :) så kommer der et billed.
Jeg har engang kodet i asp. Hvor jeg har koden. Ved du hvordan jeg retter det? Det ville være godt.
Classic ASP:
<%
function smiley(felt)
'opstning
felt=Replace(felt,vbNewLine, "<br>")
felt=Replace(felt," "," ")
'Smileys
felt=Replace(felt,":)","<img src=""http://img147.imageshack.us/img147/210/iconsmile6ka.gif"" align=""middle"">")
felt=Replace(felt,":P","<img src=""http://img131.imageshack.us/img131/4095/iconsmiledead6pr.gif"" align=""middle"">")
felt=Replace(felt,":D","<img src=""http://img125.imageshack.us/img125/1130/iconsmilebig1he.gif"" align=""middle"">")
felt=Replace(felt,":(","<img src=""http://img147.imageshack.us/img147/8980/iconsmileangry2mz.gif"" align=""middle"">")
felt=Replace(felt,":-)","<img src=""http://img147.imageshack.us/img147/210/iconsmile6ka.gif"" align=""middle"">")
felt=Replace(felt,":-P","<img src=""http://img131.imageshack.us/img131/4095/iconsmiledead6pr.gif"" align=""middle"">")
felt=Replace(felt,":-D","<img src=""http://img125.imageshack.us/img125/1130/iconsmilebig1he.gif"" align=""middle"">")
felt=Replace(felt,":-(","<img src=""http://img147.imageshack.us/img147/8980/iconsmileangry2mz.gif"" align=""middle"">")
smiley=felt
end function
%>
<%=Response.Write(smiley(RS("Tekst")))%> Når man skal hente.
Jeg bruger Detailview.
Håber nogle kan hjælpe