Click here to Skip to main content
15,920,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I am using below code to show my crystal report in pdf in a popup window. But, I need to display modalpopup window instead of regular popup window,
what changes i need to make to do so.

Any help is appreciated.
RptDoc.ExportToDisk(ExportFormatType.PortableDocFormat,Server.MapPath("/SRVRpt.pdf"));
string popupscript = "<script language='javascript'>"+"window.open('/SRVRpt.pdf');</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(),"PopUpWindow", popupscript, false);
Posted
Updated 21-Jun-11 4:23am
v2

1 solution

Use showModalDialog like as below
RptDoc.ExportToDisk(ExportFormatType.PortableDocFormat,Server.MapPath("/SRVRpt.pdf"));
string popupscript = "<script language="'javascript'">" + "window.showModalDialog('/SRVRpt.pdf','','');</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(),"PopUpWindow", popupscript, false);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900