用户控件的弹出窗口 [英] popup window for usercontrol

查看:71
本文介绍了用户控件的弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在aspx页面中使用了asp.net的两个用户控件.我的一个用户控件中有一个if条件,在该条件中我要做出决定,我想打开一个弹出窗口.任何帮助都会沉淀出来.

我如何在usercontrol中使用弹出窗口?


I am using two user control of asp.net in my aspx page. I have a if condition in one of my user control where i am making a decision , base of the decision i want to open a popup window. Any help will be precipitated.

How i used popup window in usercontrol?


If Not txtphyNPI.Text = lblphyNPI.Text Then
 
  MY POPUP CODE IS HERE
 
End If



我可以在aspx页面上使用弹出窗口,但是我的aspx页面具有用户控件,并且我想在用户控件中使用弹出窗口.问题是当我将代码放在aspx页面中时,它的工作正常,但是我希望我的代码位于用户控件中.每当我将弹出窗口代码放在用户控件中时,它都无法正常工作.

我认为它没有获得.js文件的引用.

谢谢,

/*在问题中添加了注释... */



I can use popup window on my aspx page, But my aspx page has a user Control and i want to use popup window in my user control. Problem is when i put code in my aspx page its work ,but i want my code in User control . when ever i put my popup window code in user control its not working.

I think its not getting references of .js files.

Thanks,

/* Added the comment to the question... */

推荐答案

hi,

尝试查看RegisterStartupScript或RegisterClientScriptBlock方法.

http://msdn.microsoft.com/en-us/library/z9h4dk8y.aspx [ ^ ]

http://msdn.microsoft.com/en-us/library/btf44dc9.aspx [ ^ ]


Try look at RegisterStartupScript or RegisterClientScriptBlock method.

http://msdn.microsoft.com/en-us/library/z9h4dk8y.aspx[^]

http://msdn.microsoft.com/en-us/library/btf44dc9.aspx[^]


这篇关于用户控件的弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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