I use file name to save that in the database. but I get some error when I want to download some files that have some character like: "& , # "
The errors are :
bad request
or
A potentially dangerous Request.Path value was detected from the client (&)
This is an example of file name: 03. & Love & # m.mp3
And this is my code:
download_link.HRef = "upload/fm/" + ds.Tables[0].Rows[0]["mu_file"];
How can I encode or validate the file name by a safe way.