Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 asp.net 创建一个自定义控件。在控件本身中,我必须调用 url 来获取自动完成的结果。但是类库不支持 .aspx、.ashx 文件格式。是否有任何其他格式可以替代上述在类库中重定向。
也许这会有所帮助:
jQuery 自动完成和 ASP.NET
jQuery 自动完成功能适用于 ashx(我使用它)。如果您发布一些代码以查看问题所在,也许会很有用。
只要它们以正确的格式返回数据,您就可以使用任何类型的可下载 asp 文件(aspx、ashx 和 asmx)。
实际上,ASHX 是一个 HTTP 处理程序;您可以使用 IHttpHandler 创建一个处理程序,在该部分中注册它,然后使用它来处理请求。
HTH。