简体   繁体   English

ASP.NET网站中的JQuery插件

[英]JQuery Plugin in ASP.NET Web Site

I have an ASP.NET web site and I need to make a number of asp.net dropdownlist controls searchable (across a number of pages). 我有一个ASP.NET网站,我需要使多个asp.net下拉列表控件可搜索(跨多个页面)。 I am using the jQuery Searchable DropDown Plugin and it works fine on one of the pages I have tested it on. 我正在使用jQuery Searchable DropDown插件,并且在我对其进行过测试的页面之一上运行良好。 My question is as follows, Should I be able to reference the plugin on the site.master and expect it to be referenced in all pages or do I have to reference it on all pages that I want to use it on? 我的问题如下,我应该能够在site.master上引用该插件,并希望在所有页面上都可以引用该插件,还是必须在要使用该插件的所有页面上都可以引用该插件?

If I have to add a reference to the plugin on each page then that is fine but if I can just add it in one place then obviously that is better. 如果我必须在每个页面上添加对插件的引用,那很好,但是如果我可以将其添加到一个地方,那么显然更好。 I have tried it and it didn't work for me but maybe it should work. 我已经尝试过了,但它对我不起作用,但也许应该可以。

Thanks in advance for your help 在此先感谢您的帮助

if you have multiple pages that have master page better way is you place jquery searchable dropdown in master page for use in all pages Inherited this masterPage. 如果您有多个具有母版页的更好的方法,则是将jQuery可搜索下拉列表放置在母版页中,以用于所有继承该母版页的页面。 otherwise if you have pages in various category and each category have separated masterPage you can place dropDown in each master page. 否则,如果您的页面具有各种类别,并且每个类别都有单独的masterPage,则可以在每个母版页中放置dropDown。 in last state you can place dropDown in each page. 在最后状态下,您可以在每个页面中放置dropDown。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM