在网页中隐藏URL [英] Hide URL in Web Page

查看:100
本文介绍了在网页中隐藏URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,


请帮助我找出隐藏PDF源URL的可能方法.我只想显示PDF的内容而不是PDF的源URL.例如,位于d:/common/work/sample.pdf的PDF.通常,它显示http://localhost/myproj/common/work/sample.pdf

我想向用户显示上面的URL.我想简单地显示默认的URl,例如:http://localhost/myproj


请帮助我找出最可靠的方法.


谢谢.

Hi Friends,


Please help me to find out the possible way to hide the PDF source URL.I want to just show the content of PDF not the source URL of the PDF.For Example, PDF located at d:/common/work/sample.pdf. Normally it shows http://localhost/myproj/common/work/sample.pdf

I want want to show the above URL to the user.I want to simply Show the default URl like: http://localhost/myproj


Please help me to find out the most reliable way.


Thanks.

推荐答案

尝试一下:

Try this :

string filename = "attachment; filename=d:/common/work/sample.pdf";


    Response.Clear();
    Response.ContentType = "application/pdf";
    Response.AddHeader("content-disposition", filename);
    Response.BinaryWrite(bytes);
    Response.Flush();
    Response.End();


这篇关于在网页中隐藏URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆