如果我打开一个Pdf文件,则无法关闭Ajax模式弹出窗口 [英] Unable To Close An Ajax Modal Popup If I Open A Pdf File

查看:71
本文介绍了如果我打开一个Pdf文件,则无法关闭Ajax模式弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用模式弹出来检查用户的可访问性如果他成功完全登录我允许打开PDF文件。当我打开PDF文件时,我想关闭Ajax模式弹出窗口但无法关闭。

------------------------------------------ ---

代码

---------------- --------------------------------

protected void BtnPassword_Click(object sender,EventArgs e)

{



// bool PasswordRequired = Convert.ToBoolean((dtClient.Rows [0] [PasswordRequired]。ToString() ==)?0:dtClient.Rows [0] [PasswordRequired]。ToString());



byte [] _encryptPassword = TxtPassword。 Text.Trim();

string _byteToText = Security.ByteArrayToString(_encryptPassword);



BLL_M_Users objusers = new BLL_M_Users();

System.Data.DataTable dtUser;

dtUser = objusers.CheckForUserAuthentication(Convert.ToString(Session [Name]),_ byteToText,Convert.ToString(Session [CompanyID ]));



if(dtUser.Rows.Count> 0)

{

ModalPopupExtender1。隐藏() ;

GenerateReport();

}

else

{

。 RegisterStartupScript(alert,< script language ='javascript'> alert('Incorrect Password。')< / script>);

}



}





----------------- --------------

---------------------------- ---



这是我的代码如果在模态弹出按钮中单击我是用户进行用户身份验证如果成功我试图关闭模式弹出并打开一个pdf文件,但我无法隐藏modalpopup扩展程序。



任何人都可以帮我解决这个问题



谢谢,

Aditya。

Hi,

I am using a modal pop up to check the Accessibility of user if he success fully logs in i am allowing to open a PDF File. when i am opening the PDF File i want to close the Ajax modal popup but unable to close.
---------------------------------------------
CODE
------------------------------------------------
protected void BtnPassword_Click(object sender, EventArgs e)
{

//bool PasswordRequired = Convert.ToBoolean((dtClient.Rows[0]["PasswordRequired"].ToString() == "") ? "0" : dtClient.Rows[0]["PasswordRequired"].ToString());

byte[] _encryptPassword = TxtPassword.Text.Trim();
string _byteToText = Security.ByteArrayToString(_encryptPassword);

BLL_M_Users objusers = new BLL_M_Users();
System.Data.DataTable dtUser;
dtUser = objusers.CheckForUserAuthentication(Convert.ToString(Session["Name"]), _byteToText, Convert.ToString(Session["CompanyID"]));

if (dtUser.Rows.Count > 0)
{
ModalPopupExtender1.Hide();
GenerateReport();
}
else
{
Page.RegisterStartupScript("alert", "<script language='javascript'>alert('Incorrect Password.')</script>");
}

}


-------------------------------
-------------------------------

Here is my code if in the modal popup button click i am user for user authentication if successful i am trying to close the modal pop up and open an pdf file but i am unable to hide the modalpopup extender.

can any one help me in solving this issue

Thanks,
Aditya.

推荐答案

这篇关于如果我打开一个Pdf文件,则无法关闭Ajax模式弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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