TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Paul Rajs
NA
641
146.6k
How to Disable or Prevent a .Pdffile from being printed or d
Sep 5 2017 8:10 AM
hi Developers ,
i want to disable or prevent a .Pdf file on browser .
in my project i am opening a .Pdf from database to new tab . now i want to Disable Printable or Download from the End user. because all attachments are govt property and valuables.
this is my code for open a .Pdf file on a new tab .
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = Connection.DBConn();
string str = "SELECT KeyFactsFileName FROM tbl_question where id='" + sno + "' and status='A'";
SqlDataAdapter sda = new SqlDataAdapter(str, con);
DataSet ds = new DataSet();
sda.Fill(ds);
string path = ds.Tables[0].Rows[0]["KeyFactsFileName"].ToString();
string urlName = Request.Url.AbsoluteUri;
urlName = urlName.Remove(urlName.LastIndexOf("/"));
string url = string.Format("{0}/Files/{1}", urlName, path);
string script = "<script type='text/javascript'>window.open('" + url + "')</script>";
this.ClientScript.RegisterStartupScript(this.GetType(), "script", script);
}
how can i done this task , could anyone know please suggest me to how can i done this task
thanking with
Paul.S
Reply
Answers (
1
)
Rendering of master page in MVC only once in the entire life
Install .IPA file in iphone.................