如何在.ascx文件扩展名中编写自动完成代码 [英] How to write auto complete code in .ascx file extension
本文介绍了如何在.ascx文件扩展名中编写自动完成代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好。我正在做一个电子商务项目。在搜索产品时,我正在部署自动完成功能。我希望将自动完成功能写入.ascx文件扩展名。但我不知道知道如何在.ascx扩展名中编写代码。请以.ascx文件格式编写函数帮助。
谢谢。
解决方案
< blockquote>在AutoComplete.asmx中编写以下代码
<%@ WebService Language =C#CodeBehind =〜/ AutoComplete.csClass =AutoComplete%>
并在AutoComplete.cs中根据您的搜索值写入
[WebMethod]
public string [] studentName( string prefixText)
{
select Select_Object = new < span class =code-sdkkeyword> select ();
string [] student_Name = Select_Object.StudentName(prefixText);
return student_Name;
}
Hello every one..I am doing a e-commerce project.In searching for a product in that i am deploying auto complete function.I want tat auto complete function to be written in .ascx file extension.But i do not know how to write code in .ascx extension.Please any one help in writing the function in .ascx file format.
Thank you.
解决方案
In AutoComplete.asmx write following code
<%@ WebService Language="C#" CodeBehind="~/AutoComplete.cs" Class="AutoComplete" %>
And in AutoComplete.cs write according to your search value
[WebMethod] public string[] studentName(string prefixText) { select Select_Object = new select(); string[] student_Name = Select_Object.StudentName(prefixText); return student_Name; }
这篇关于如何在.ascx文件扩展名中编写自动完成代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文