If you intend to insert the string into the HTML markup then you need to HTML encode it:
<%= Html.Encode("',&@#'") %>
or if you are using ASP.NET 4.0:
<%: "',&@#'" %>
Doing this will properly encode any characters in the string.
Darin Dimitrov
2010-06-19 09:26:42