如何在ASP.NET中选择组合框项目时创建弹出窗口 [英] How to create a pop up window when combobox item is selected in ASP.NET
本文介绍了如何在ASP.NET中选择组合框项目时创建弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问题是我想使用组合框来过滤数据网格视图中显示的数据,但我希望仅当用户选择组合框ID并在提示窗口中输入密码时才显示它。我不知道如何实现这个目标。请帮助
我尝试了什么:
i已经在intenert for sources可以让我对我的问题有所了解但却没有找到。所以我没有任何片段。请帮助我使用asp.net与c#
the problem is i want to use a combo box to filter data that woud be displayed in the datagridview but i want it to be displayed only when the user selects a combobox id and enters a password in a prompt window. i have no idea how to archieve this. please help
What I have tried:
i have seached on the intenert for sources that could give me an idea about my problem but have found none. so i dont have any snippet. please help me ian using asp.net with c#
推荐答案
这个Google搜索: javascript show弹出组合框选择 [ ^ ]
找到了这个答案:使用JavaScript和jQuery在OnChange事件中获取DropDownList的选定文本和值 [ ^ ]
This Google Search: javascript show popup on combobox select[^]
found this answer: Get selected Text and Value of DropDownList in OnChange event using JavaScript and jQuery[^]
步骤1 [ ^ ]从<获取值code>更改项目时的下拉列表
步骤2 [ ^ ]从<获取值code>提示窗口并将其存储在变量中
第3步 [ ^ ]创建hidde n字段
并存储提示值
第4步 [< a href =https://stackoverflow.com/a/15215645/1147428target =_ blanktitle =New Window> ^ ]创建一个虚拟asp按钮$在页面中c $ c>(隐藏)并在从用户读取提示值后调用按钮
单击
事件。
步骤4:根据下拉值
和隐藏字段值
,更新虚拟按钮单击事件中的gridview
数据。
Step 1[^] Get the value fromDrop down list
while changing the item
Step 2[^] Get the value fromprompt
window and store it in a variable
Step 3[^] Create ahidden field
and store the prompt value
Step 4[^] Create a dummyasp button
(hidden) in the page and invoke the buttonclick
event once the prompt value is read from the user.
Step 4: based on thedrop down value
and thehidden field value
, update thegridview
data in the dummy button click event.
这篇关于如何在ASP.NET中选择组合框项目时创建弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文