2016-11-16 12 views
0

私のオートコンプリートが機能しない理由を私は本当に混同しています。なぜこれが動作していないのか教えてください。 Date Time pickerが動作していない場合でも、 "Gentellela Alela"を使用しているテンプレートがあるかどうか疑問です。私の人を助けてください。事前のおかげでは、以下JQuery UIオートコンプリートが動作しないasp.net

はコード

<link href="Styles/bootstrap.min.css" rel="stylesheet" /> 
    <link href="Styles/font-awesome.min.css" rel="stylesheet" /> 
    <link href="Styles/nprogress.css" rel="stylesheet" /> 
    <link href="Styles/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet" /> 
    <link href="Styles/daterangepicker.css" rel="stylesheet" /> 
    <link href="Styles/jqvmap.min.css" rel="stylesheet" /> 
    <link href="Styles/custom.min.css" rel="stylesheet" /> 
    <link href="Styles/cust.css" rel="stylesheet" /> 
    <link href="Styles/style.css" rel="stylesheet" /> 
    <script src="~/Scripts/jquery-ui-1.12.1.js"></script> 



    <script type="text/javascript"> 
     $(function() { 
      $("#<%= txtProdCode.ClientID%>").autocomplete({ 
       source: function (request, response) { 
        $.ajax({ 
         url: "<%:Page.ResolveUrl("~/WS/Platts.asmx/FilterItem")%>", 
         data: "{ 'filterstring': '" + request.term + "' }", 
         dataType: "json", 
         type: "POST", 
         contentType: "application/json; charset=utf-8", 
         dataFilter: function (data) { return data; }, 
         success: function (data) { 
          response($.map(data.d, function (item) { 
           return { 
            label: item.prDesc, 
            value: item.prDesc 
           } 
          })) 
         }, 
         error: function (XMLHttpRequest, textStatus, errorThrown) { 
          alert(errorThrown); 
         } 
        }); 
       }, 
       minLength: 2 

      }); 
     }); 
    </script> 

Windowsサービス(.asmxファイル)

<WebMethod()> _ 
    Public Function FilterItem(ByVal filterstring As String) As List(Of ProductDetail) 
     Dim retEmp As New List(Of ProductDetail) 
     Using secrpt As New BLL.TradingModel.TradingTransactionRepository 
      retEmp = secrpt.GetAllPlattCode().Where(Function(c) c.prDesc.ToLower.Contains(filterstring)).ToList 
     End Using 
     Return retEmp 
    End Function 

リポジトリ

Public Function GetAllPlattCode() As List(Of ProductDetail) 
      Return (From _plt As ProductDetail In TradingTransactionCTX.ProductDetails Order By _plt.pID).ToList 
     End Function 
+0

マスターページはありますか? –

+0

@SaadSuriはいマスターページがあります – jezz

+0

マスター名のテキストボックスを呼び出してみます。あなたはinspect要素を通して見つけることができます。あなた –

答えて

0
です

追加:前

<script 
       src="https://code.jquery.com/jquery-2.2.4.min.js" 
       integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" 
       crossorigin="anonymous"></script> 

<script src="~/Scripts/jquery-ui-1.12.1.js"></script> 

、その後、あなたが任意のjQueryの要素やコマンドを使用することができます。

+0

は動作していません: – jezz

+0

jquery.jsを追加してから、他のjqueryコマンドまたはウィジェットを使用することができます。 – hugmax

関連する問題