如何根据下拉列表选择显示模态弹出窗口? [英] How to show modal popup based on drop down list selection ?

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

问题描述

你好,

我们怎么能买一个ajax模态弹出面板?

我有一个下拉列表和一个按钮。根据下拉列表中的选项,如何显示模块弹出窗口?



在下拉列表中有通过和失败项。如果选中的项目是通过,然后点击按钮,我如何显示一个模态弹出面板,在gridview中显示一些细节?



基于一些教程,我可以在按钮点击时显示弹出窗口,但我无法将其绑定到下拉列表选项。





注意:我已经提到此链接

解决方案

您好



以下链接可能有所帮助。



http://forums.asp.net/t/ 1498939.aspx [ ^ ]



如果它解决了您的问题,请将其标记为答案。


使用下拉列表事件onchange显示用户何时从中选择任何项目下拉列表。



onchange事件是一个javascript事件。



或者我们可以使用c#SelectedIndexChanged事件,您可以在SelectedIndexChanged事件中添加您在按钮单击事件中使用的相同代码。如果您的按钮点击事件在javascript中,请在javascript onchange事件中添加相同的代码。



使用以下链接。它将显示如何在下拉列表中显示弹出窗口点击



显示弹出选择下拉列表项 [ ^ ]

Hello,
how can we shoe an ajax modal popup panel ?
I have a dropdownlist and a button. Based on the selections from dropdownlist, how is it possible to show a modl popup window ?

In the Dropdownlist are items "Passed" and "Failed". If the item selected is "Passed", then on button click, how can I show a modal popup panel that show some details in gridview ?

Based on some tutorials, I could show popup on button click, but I cannot bind it to the dropdownlist selection.


NB: I have referred this link

解决方案

Hi

The followin link may help .

http://forums.asp.net/t/1498939.aspx[^]

Kindly mark it as answer if it resolves your question .


Use the dropdown list event onchange to show when the user select any item from the dropdownlist.

The onchange event is a javascript event.

Or we can use the c# SelectedIndexChanged event and you can add the same code you have used inside button click event also in the SelectedIndexChanged event. If your buttion click event is in javascript add the same code inside the javascript onchange event.

Use the following link. It will show how to show the popup on dropdownlist click

Display popup on selecting drop down list item[^]


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

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