选择下拉列表项时显示弹出窗口 [英] Display popup on selecting drop down list item

查看:81
本文介绍了选择下拉列表项时显示弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家,

我有一个下拉列表,我有4个列表项。如果我选​​择一个列表项,我想显示一个弹出窗口。同样在弹出窗口中,我必须显示一个超链接,该超链接应该导航到另一个页面..

请尽快给我建议和解决方案。

谢谢和关注,

Anusha

Hi experts,
I have a dropdownlist and i have some 4 list items.. I want to display a pop up if i select a list item. Also in the popup, I have to show a hyperlink which should navigate to another page..
Please give me suggestions and solutions as soon as possible.
Thanks and regard,
Anusha

推荐答案

在下拉列表selectedindexchanged事件中,

使用javascript调用弹出窗口并显示它。



In the dropdownlist selectedindexchanged event,
call the popup using javascript and display it.

string script = string.Format("window.open('{0}', null, 'height=600, width=800, status=yes, location=yes, menubar=yes, resizable=yes, scrollbars=yes, status=yes, toolbar=yes, titlebar=yes')", pageURL);

Page.ClientScript.RegisterClientScriptBlock(GetType(), "LaunchTemplate", script, true);





pageURL将是ascx或aspx页面。



在用户控件中有超链接并且onclick导航它



pageURL will be the ascx or aspx page.

have Hyperlink inside the usercontrol and onclick navigate it


默认消息框不会帮助你。你需要去自定义弹出窗口/ 模态弹出扩展器 [ ^ ] / JQuery对话框 [ ^ ]。请参阅以下链接以获取类似文章。

ASP.NET Popup Control [ ^ ]



类似主题:

弹出自定义消息并设置选项 [ ^ ]





--Amit
Default Message Box is not going to help you. You need to go for a custom popup / modal popup extender[^] / JQuery Dialog[^] for it. Refer the links below for similar articles.
ASP.NET Popup Control[^]

Similar Threads:
Pop-up with custom message and set the options[^]


--Amit


这篇关于选择下拉列表项时显示弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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