In Web.Config File
add key="AboutTess_Pdf_Path" value="Documents/sampleAboutTess.pdf"
appSettings --End
In .CS File
if(!Page.IsPostBack)
{
string strPDFPath = ConfigurationSettings.AppSettings["AboutTess_Pdf_Path"].ToString();
string popupScript = "Javascript: return " +
"window.open('"+ strPDFPath + "', 'CustomPopUp', " +
"'width=600, height=600, menubar=no, resizable=yes');";
//Attach Script to button control
btnDownloadPDF.Attributes.Add("onclick",popupScript);
}
No comments:
Post a Comment