Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9096345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:49:22+00:00 2026-06-16T23:49:22+00:00

I am developing an app in which i need to give searching option to

  • 0

I am developing an app in which i need to give searching option to user like if user enters ‘scienc’ the search functions should get the courses with name science or if in their description science like word occurs, i mean to say if user enters half word query should get full word by matching characters sequence but i don’t know how to implement this and i am using Entity Framework in my application.

One thing more i need to search from multiple tables.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:49:24+00:00Added an answer on June 16, 2026 at 11:49 pm

    i think you want to implement AUto complete if so then following code will solved out your problem:

    Code file:

     [WebMethod(EnableSession = true)]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
    public string[] GetPatientLastName(string prefix)
    {
        List<string> customers = new List<string>();
        using (SqlConnection conn = new SqlConnection())
        {
            string connectionstring = CCMMUtility.GetCacheForWholeApplication();
            conn.ConnectionString = connectionstring;
            using (SqlCommand cmd = new SqlCommand())
            {
                cmd.CommandText = "select distinct top(10) PatientLastname from tblMessage where  " +
                "PatientLastname  like '%'+ @SearchText + '%' order by PatientLastname";
                cmd.Parameters.AddWithValue("@SearchText", prefix);
                cmd.Connection = conn;
                conn.Open();
                using (SqlDataReader sdr = cmd.ExecuteReader())
                {
                    while (sdr.Read())
                    {
                        customers.Add(string.Format("{0}", sdr["PatientLastname"]));
                    }
                }
                conn.Close();
            }
            return customers.ToArray();
        }
    }
    

    Jquery code:

     $(document).ready(function () {
            $('[ID$=txtPatientLastname]').live('keyup.autocomplete', function () {
    
                $(this).autocomplete({
                    source: function (request, response) {
                        $.ajax({
                            url: '<%=ResolveUrl("~/Resources/WebService.asmx/GetPatientLastName") %>',
                            data: "{ 'prefix': '" + request.term + "'}",
                            dataType: "json",
                            type: "POST",
                            contentType: "application/json; charset=utf-8",
                            success: function (data) {
                                response($.map(data.d, function (item) {
                                    return {
                                        label: item.split('-')[0],
                                        val: item.split('-')[1]
                                    }
                                }))
                            },
                            error: function (response) {
                                alert(response.responseText);
                            },
                            failure: function (response) {
                                alert(response.responseText);
                            }
                        });
                    },
                    select: function (e, i) {
                    },
                    minLength: 1
                });
            });
    });
    

    Hope this will fulfill your requirement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im developing a app which has a user sign-up activity, there I need to
I'm developing an app which requires the system to get the touch events even
I am developing an app in which I need to record the audio. Now
I am developing an android app in which i need to display images after
I am developing a app for a movie in which I need to fetch
I am developing an android app which requires search functionality. My app contains action
I am developing App in which PDF text searching & highlighting is needed. I
I am developing an app in which I need to manage users session i.e
I am developing one app in which i need to call at particular phone
i am developing one app in which i need to show list of product

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.