Modal popup search window to replace dropdown control ASP.NET

我怕爱的太早我们不能终老 提交于 2019-12-04 12:14:04

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?

A very simple approach would be to add javascript to your page to popup a new browser window dialog, something like this:

function fnFieldSearch(searchURL)
{
    var wndSearch = window.open(searchURL,"SearchPopup","toolbar=yes,width=600,height=400,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no");
    wndSearch.focus();
}

On the modal search page, use javascript to send the search value back:

window.opener.document.FormName.ControlName.value = 'whatever';
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!