模态弹出搜索窗口替换下拉控件 ASP.NET
我正在寻找在 ASP.NET 3.5 应用程序顶部弹出模式搜索窗口以查找字段值的最简单方法。 我有一个屏幕供用户添加课程; 用户需要能够通过在弹出窗口中搜索讲师来选择讲师。
所以 - 弹出窗口将有一个文本框和一个带有结果的网格视图; 单击结果中的“选择”按钮将填充调用表单上的讲师字段。
实现这一目标的最简单方法是什么?
I'm looking for the simplest way of popping a modal search window on top of an ASP.NET 3.5 application to look up values for a field. I've got a screen for users to add courses; users need to be able to choose an instructor by searching for instructors in a popup.
So - the popup would have a textbox and a gridview with results; clicking the "choose" button in a result would populate the instructor field on the calling form.
What's the simplest way to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试在 UserControl 中使用 jQuery,类似于 yensdesign。
我用这种方法创建的 UserControl 为用户提供了设置网站首选项的选项。 我发现使用这种方法比调用新的弹出浏览器窗口更容易控制模式窗口和调用窗口之间的交互。 人们也不必担心弹出窗口拦截器的干扰。
这有帮助吗还是您正在寻找更多详细信息?
Try using jQuery inside a UserControl with something like the tutorial from yensdesign.
The UserControl I created with this approach provided the user the option to set their preferences for the site. I found with this approach it was easier to control the interaction between the modal window and the calling window than calling a new popup browser window. One also doesn't have to worry about popup blockers getting in the way.
Is this helpful or are you looking for more detail?
一个非常简单的方法是在页面中添加 javascript 以弹出一个新的浏览器窗口对话框,如下所示:
在模态搜索页面上,使用 javascript 将搜索值发送回:
A very simple approach would be to add javascript to your page to popup a new browser window dialog, something like this:
On the modal search page, use javascript to send the search value back: