The problem is that when the button is clicked it opens a modal dialog but the pdf file is not displayed.
When i use window.open instead of window.showModalDialog the pdf file is displayed.But I want to display the file in a modal dialog so that the parent window will be disabled.
Praveen_Bhar...
Member
31 Points
78 Posts
opening a webform , that loads pdf file , in a modal dialog
Apr 22, 2012 11:30 AM|LINK
I have a webform that displays pdf file as soon as it loads.Here is the code in its pageload
WebForm3.aspx
Response.Clear() Response.ContentType = "application/pdf" Response.WriteFile("~/PDF-sample3.pdf")Now in the button click of WebForm2.aspx i have the below code
Response.Write("<script type='text/javascript'>window.showModalDialog('WebForm3.aspx');</script>")The problem is that when the button is clicked it opens a modal dialog but the pdf file is not displayed.
When i use window.open instead of window.showModalDialog the pdf file is displayed.But I want to display the file in a modal dialog so that the parent window will be disabled.
Please suggest a solution to this problem.
Thanks.
niksv
Contributor
5925 Points
1115 Posts
Re: opening a webform , that loads pdf file , in a modal dialog
Apr 23, 2012 07:49 AM|LINK
http://forums.asp.net/t/1212594.aspx/1