How to create a route that catch all pdf file?
Posted
by VinnyG
on Stack Overflow
See other posts from Stack Overflow
or by VinnyG
Published on 2010-04-08T20:52:17Z
Indexed on
2010/04/09
1:53 UTC
Read the original article
Hit count: 460
I want to have my pdf files sent this way to my users :
public ActionResult GetPDF( string filename )
{
return File( filename, "application/pdf", Server.HtmlEncode( filename ) );
}
But I don't know how to create a route that will catch all the different pdf file in my site?
Thanks a lot for the help!
© Stack Overflow or respective owner