选择下拉列表项时显示弹出窗口
问题描述:
嗨专家,
我有一个下拉列表,我有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