Click here to Skip to main content
15,906,574 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Comments
me.ajaykumar 5-Sep-13 7:41am    
ascx is extension of user control, so it is all about writing code in usercontrol instead of Page level,and rest the below suggested solution will work fine :)

1 solution

In AutoComplete.asmx write following code
<%@ WebService Language="C#" CodeBehind="~/AutoComplete.cs" Class="AutoComplete" %>
And in AutoComplete.cs write according to your search value

C#
[WebMethod]
   public string[] studentName(string prefixText)
   {
       select Select_Object = new select();
       string[] student_Name = Select_Object.StudentName(prefixText);
       return student_Name;
   }
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900