.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

build repository from SQL 2005? for a Linq, Jquery autocomplete

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net
 

Hello,

  I have the a question am going about his correctly I have a database for categories, it has many fields and about 4000 records,  but with a Jquery autocomplete needing speed and the fact that I only need to return a key and category name. I did the following:  (oh just to note, MVC2, Ajax project)

someclass.cs

    public class categorySearch
    {
        public Guid Category_GUID { get; set; }
        public string Category_Name { get; set; }

    }

and now for the repository
Categoryrepository.cs

    public class categoryRepository
    {
        internal List<categorySearch> FindCategory(string searchText, int maxResults)
        {
            List<categorySearch> category = new List<categorySearch>();
            dbWebEntities storedb = new dbWebEntities(); 

            var getcat = storedb.Categories.ToList();

            foreach (var item in getcat)
            {
                category.Add(new categorySearch { Category_GUID = item.Cat_GUID, Category_Name = item.Category_Name});
            }

            var result = from c in category
                         where c.Category_Name.Contains(searchText)
                         orderby c.Category_Name
                       


View Complete Post


More Related Resource Links

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

To that end, I'm going to walk you through these four steps to effectively implementing a client side Repeater, using ASP.NET AJAX and jQuery:

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

jquery autocomplete multiple values

  

i got some samples and i did autocomplete using jquery , its working well for single input values

but i need to pass multiples values after one by one in the textbox. Is it possible to pass multiple

values in the textbox for autocomplete in jquery in asp.net?

 


Cutting Edge: Build Rich User Interfaces with jQuery

  

In this month's installment we build modal and modeless dialog boxes in jQuery and explain how to post data from them to the Web server.

Dino Esposito

MSDN Magazine May 2009


VSTO: Build Office-Based Solutions Using WPF, WCF, And LINQ

  

With Visual Studio Tools for Office you can easily build Office-based services that harness the power of Windows Communication Foundation, Windows Presentation Foundation, and LINQ.

Andrew Whitechapel

MSDN Magazine December 2007


jquery autocomplete selected value

  

Hi,

Iam using jquery autocomplete to search data and i have button to get the detail value of employee and

display in label , what i need is that , i don't want to put button to get detail , instead i need to select the from\

auto search and press enter key  and show the detail in the lablel example(empname,address, emailid).


Looking forward valuable suggestions


jQuery UI Autocomplete, Web Services and JSON

  
Hi guys, this is my first post, I´m desperate after wasting 2 days in google and reading forums ans sites. I can´t make it work. I just want to provide the name of cities to show in the autocomplete plugin. Let´s go part by part:WEB SERVICE: I use the Json.Net component to serialize a datasetpublic string ConsultTable(string data) { SqlConnection connection = new SqlConnection(WebConfigurationManager.ConnectionStrings["SqlServerConnection"].ToString()); SqlCommand command = new SqlCommand("SELECT name FROM cities",connection); connection.Open(); DataSet dataset = ToDataSet(command.ExecuteReader()); Newtonsoft.Json.JsonSerializer json = new Newtonsoft.Json.JsonSerializer(); json.NullValueHandling = NullValueHandling.Ignore; json.ObjectCreationHandling = Newtonsoft.Json.ObjectCreationHandling.Replace; json.MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore; json.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; json.Converters.Add(new DataSetConverter()); StringWriter sw = new StringWriter(); Newtonsoft.Json.JsonTextWriter writer = new JsonTextWriter(sw); writer.Formatting = Formatting.None; writer.QuoteChar = '"'; json.Se

ashx handler using jquery autocomplete

  
Hi, i have using jquery for autocompelete option and iam using ashx file , i have 2textbox  , i need to show diffrent search record in the text box, iam using 2 ashx file to show the value using jquery, i want to user single ashx file instead of iam using 2 ashx handle filercan use switch case to handle this , i want to use 7textbox  all textbox i need to do autosearch, how to handlethis senario using jquery and ashx handler file below the code this is my codebehind query clsquery.updatetablestring = "select top 2 Cont_number from ASPrearrival_list where Cont_number";         clsquery.updatetablestring = "select top 2 custid,custname from ASCustomer where custname"; // this is my auto search iam using 2 handler file , i wants only one handler instead of 2handler <script type="text/javascript" src="jquery.autocomplete.js"></script>      <script type="text/javascript">       $(document).ready(function()       {                       $("#<%=txtcontno.ClientID%>").autocomplete("Handler1.ashx");           $("#<%=txtcname.ClientID%>&q

Service Pack and Build to SQL SERVER 2005

  
Dear Sirs,
I installed the SQL SERVER 2005 and found that the latest service pack for it's SP3.
But the site http://support.microsoft.com/kb/960598/en-us, I noticed that there are several "builds" (cumulative update) to apply too.
My question is: after applying SP3 to SQL 2005, I need to install all the cumulative update's from 1 to 11, or the latter accumulates all previous fixes?
What must be done in this case?
Now, thank you the attention and collaboration.

JQuery Autocomplete Call WCF Service Method

  

I am trying to use the below code to call a wcf service method for Autocomplete functionality in a TextBox.  I have written the following query:

$(document).ready(function () {
            $("#<%= txtCompany.ClientID %>").autocomplete(http://localhost/PieScore/PieScore.Application.Services/EmployeeService.svc/GetTestCompanyList, {
                dataType: 'json',
                parse: function (data) {
                    var items = data.d;
                    var parsed = [];
                    for (var i = 0; i < items.length; i++)
                        parsed[i] = {
                     

jquery autocomplete not firing

  

<

Hi,

iam using jquery auto complete for ,but its not firing handlerold.ashx file,

pls give valuable suggestions

script type="text/javascript">
//      $(document).ready(function()
//      {
//   
        $("#<%=txtguages.ClientID%>").autocomplete('Handlerold.ashx',{minChars:1,extraParams:{"param1":"1"}}).result(function (event, data, formatted) {
        if (data) {
            alert('Value: '+ data[1]);
            $("#<%= Hdnguages.ClientID %>").val(data[1]);
        }
        else {
            $("#<%= Hdnguages.ClientID %>").val('-1');
        }
    });


handlerold.ashx code below

<%@ WebHandler Language="C#" %>

using System;
using System.Web;
using vdatalayer;
using System.Data.SqlClient;
using S

jquery autocomplete

  

Hi,

has anyone ever tried jquery multiple autocomplete (http://jqueryui.com/demos/autocomplete/#option-source ). How do I filter itbased on the first char?so instead of '%_%' it will be '_%'

thanks


jquery autocomplete does not show

  

Hi all


im trying to get a autocomplete with jquery


this is what i  have:

cityAutoComplete.ashx

<%@ WebHandler Language="VB" Class="cityAutoComplete" %>

Imports System
Imports System.Web
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Text

Public Class cityAutoComplete : Implements IHttpHandler
   
    
    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        Dim clDb As New myClassDb
        
        Dim prefixText As String = context.Request.QueryString("q")
        Dim sql As New SqlCommand
        sql.Connection = clDb.getConnection
        
        
        sql.CommandText = ("select CityName, CityId from tblCityVariant where " & _
                           "CityName like @SearchText + '%'")
        sql.Parameters.AddWithValue("@SearchText", prefixText)
        clDb.open()
        
        Dim sb As StringBuilder = New StringBuilder
        Dim sqlReader As SqlDataReader = sql.ExecuteReader

        While sqlReader.Read
            
            sb.Append( & sqlReader.Item(0)).Append(Environment.NewLine)
        End While


        context.Response.Write(sb.ToString)
    End Sub
 
    Public ReadOnly Property IsReusable() As Boo

JQuery autocomplete and non english characters

  


I have implemented the jquery autocomplete with a handler.

The result script is as follow.

<script type="text/javascript">
$(document).ready(function() {
    $("#ctl00_ContentPlaceHolder1_tbDepature").autocomplete('StopsService.ashx', { width: 310 });
    $("#ctl00_ContentPlaceHolder1_tbDestination").autocomplete('StopsService.ashx', { width: 310 });
    $("#ctl00_ContentPlaceHolder1_tbDate").datepicker();
});      
</script>

In StopsService.ashx i populate the content passed in with values with all english and values with all Greek characters.

The autocomplete works fine and as expected with the english characters but it doesnt display at all any options with Greek characters.

Any ideas? Is the problem on the jquery side or the handler side?

Do i need any encodings in the ashx service?


Need advice on updating SQL Server 2005 Build 09.00.4035 to Build 09.00.4220 for SharePoint 2010

  

Hello SQL Server specialists,

 

Please give me some advice on updating my SQL 2005 Server Build 09.00.4035 to Build 09.00.4220 (Cumulative update 3 ) for SharePoint 2010.

I'm stuck with the following questions:

Will I need to install previous cumulative updates in order to install cumulative update 3?

Has anyone installed SharePoint 2010 on an SQL 2005 Server before, any things I should consider when doing this?

Build 09.00.4220 (Cumulative update 3 ) is the minimum build needed to install SharePoint 2010 is it ok to run with the minimum build or would you recommend me to update to another build ?

I'm looking forward for your advice!

 

Kind Regards,

NiJor


how to use autocomplete in Textbox using LINQ code

  

Hi Everyone!

 

I'm a newbie in C# then i want to know about my concerns in textbox autocomplete from database using LINQ. Can u cite me an example on how to code it and where should I place it? Is it in Form_Load or Textbox_TextChange?

 

Tnx man and more power!


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend