Click here to Skip to main content
15,886,806 members
Articles / Web Development / ASP.NET

unable to download Filename containing & symbol

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
31 Dec 2012CPOL 4.8K  
HiI have an MVC Application. I have a Model object which holds File Name and Path on the server.In some for loop (to display files in table) i am binding anchor( tag's) href property dynamically as @item.Name This works perfectly...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
31 Dec 2012Christian Graus
You need to render the filename correctly, & is the first character of encoding for various chars. Replace it with & amp; ( without the space ).
Please Sign up or sign in to vote.
31 Dec 2012Christian Graus
Actual, you can use @Html.Raw(item.Path) in MVC to get it to render without encoding.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions