Ajaz自动完成功能无法在visual studio 2013中运行 [英] Ajaz autocomplete not working in visual studio 2013

查看:86
本文介绍了Ajaz自动完成功能无法在visual studio 2013中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了相同的代码,它在vs 2012中有效但在vs2013中没有。我想回到vs2012,但html5在vs2012中没有正确显示(css / js已被引用)。



以下是我的主页





I used the same code and it works in vs 2012 but not in vs2013. I wanted to go back to vs2012 but html5 not showing up properly in vs2012(css/js has been referenced).

Below is my master page


<pre lang="xml"><title><%: Page.Title %> - Triocars</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<asp:PlaceHolder runat="server">
    <%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>

<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<meta name="description" content="">
<meta name="author" content="">


<link rel="shortcut icon" href="~/favicon.ico">
<link rel="apple-touch-icon" href="~/apple-touch-icon.png">
<link href="Content/Site.css" rel="stylesheet" />
<link href="Theme/css/skel.css" rel="stylesheet" />
<link href="Theme/css/style.css" rel="stylesheet" />
<link href="Theme/css/style-noscript.css" rel="stylesheet" />

<link href="theme/css/font-awesome.min.css" rel="stylesheet" />

<script src="~/Scripts/libs/modernizr-1.7.min.js" type="text/javascript"></script>

<script src="Scripts/html5shiv.js"></script>

<script src="Theme/js/jquery.min.js"></script>
<script src="Theme/js/jquery.dropotron.min.js"></script>
<script src="Theme/js/skel.min.js"></script>
<script src="Theme/js/skel-layers.min.js"></script>
<script src="Theme/js/init.js"></script>


<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>













<pre lang="xml"><asp:ToolkitScriptManager ID="ToolkitScriptManager1" EnablePageMethods="true" runat="server">
    <Scripts>
        <%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
        <%--Framework Scripts--%>

        <asp:ScriptReference Name="jquery" />
        <asp:ScriptReference Name="bootstrap" />
        <asp:ScriptReference Name="respond" />
        <asp:ScriptReference Name="WebForms.js" Path="~/Scripts/WebForms/WebForms.js" />

        <asp:ScriptReference Name="MenuStandards.js" Path="~/Scripts/WebForms/MenuStandards.js" />
        <asp:ScriptReference Name="GridView.js" Path="~/Scripts/WebForms/GridView.js" />
        <asp:ScriptReference Name="DetailsView.js" Path="~/Scripts/WebForms/DetailsView.js" />
        <asp:ScriptReference Name="TreeView.js" Path="~/Scripts/WebForms/TreeView.js" />
        <asp:ScriptReference Name="WebParts.js" Path="~/Scripts/WebForms/WebParts.js" />
        <asp:ScriptReference Name="Focus.js" Path="~/Scripts/WebForms/Focus.js" />
        <asp:ScriptReference Name="WebFormsBundle" />
        <%--Site Scripts--%>
    </Scripts>
</asp:ToolkitScriptManager>









默认页:







Default Page:

<!-- Banner -->
  <div class="container body-content" style="margin-left:0px;margin-right:0px;width:100%">
     <section id="banner" >

         <!--
             ".inner" is set up as an inline-block so it automatically expands
             in both directions to fit whatever's inside it. This means it won't
             automatically wrap lines, so be sure to use line breaks where
             appropriate (<br />).
         -->
         <div class="inner" >

             <header>
                 <h2>Book A Minicab</h2>
             </header>
             <div class="row">
                 <div class="6u">
             <p>

                     <asp:TextBox ID="TextBox1" Width="100%" runat="server"  style="text-align:center"></asp:TextBox>
                     <asp:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender"

             runat="server" DelimiterCharacters=""

             Enabled="True" ServiceMethod="GetCompletionList"

             MinimumPrefixLength="1"

             CompletionSetCount="3"

                         TargetControlID="TextBox1" >
                     </asp:AutoCompleteExtender>
                     <br />

                 <asp:TextBox ID="TextBox2" Width="100%" runat="server" Placeholder="Via" style="text-align:center"></asp:TextBox><br />

                                         <asp:TextBox ID="TextBox3" Width="100%" runat="server" Placeholder="Date & Time" style="text-align:center"></asp:TextBox>


             </p></div>
                 <div class="6u">

                                         <p>



                     <asp:TextBox ID="TextBox4"  Width="100%" runat="server" Placeholder="Destination Address" style="text-align:center"></asp:TextBox><br />

                 <asp:TextBox ID="TextBox5" Width="100%" runat="server" Placeholder="Vehicle" style="text-align:center"></asp:TextBox><br />

                                         <asp:TextBox ID="TextBox6" Width="100%" runat="server" Placeholder="Phone Number" style="text-align:center"></asp:TextBox>


             </p>
                 </div>
                 </div>
             <footer>
                 <ul class="buttons vertical" >
                     <li><a href="#main" class="button fit scrolly" >Book Now</a> </li>
                 </ul>
             </footer>

         </div>

     </section>


      </div>







Default page code behind:






Default page code behind:

namespace trio_web
{
public partial class _Default : Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    [System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
    public static string[] GetCompletionList(string prefixText, int count)
    {
        // Create array of movies
        string[] movies = { "Star Wars", "Star Trek", "Superman", "Memento", "Shrek", "Shrek II" };

        // Return matching movies
        return (from m in movies where m.StartsWith(prefixText, StringComparison.CurrentCultureIgnoreCase) select m).Take(count).ToArray();
    }


}
}







It throws an exception, 0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON. If I create the project in vs2013 and open in vs2012 the result is same. Is it something to do with jquery version?



Output Window



Exception was thrown at line 647, column 3 in eval code

0x800a1391 - JavaScript runtime error: ’r’ is undefined

Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d

0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.

Parameter name: data

Exception was thrown at line 613, column 3 in eval code

0x800a1391 - JavaScript runtime error: ’D’ is undefined

Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d

0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.

Parameter name: data

Exception was thrown at line 715, column 3 in eval code

0x800a1391 - JavaScript runtime error: ’M’ is undefined

Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d

0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.

Parameter name: data

Exception was thrown at line 697, column 3 in eval code

0x800a1391 - JavaScript runtime error: ’b’ is undefined

Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d

0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.

Parameter name: data

Exception was thrown at line 661, column 3 in eval code

0x800a1391 - JavaScript runtime error: ’w’ is undefined

Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d

0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.

Parameter name: data



Any help will be much appreciated.



Thanks, Anup




It throws an exception, 0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON. If I create the project in vs2013 and open in vs2012 the result is same. Is it something to do with jquery version?

Output Window

Exception was thrown at line 647, column 3 in eval code
0x800a1391 - JavaScript runtime error: 'r' is undefined
Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d
0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.
Parameter name: data
Exception was thrown at line 613, column 3 in eval code
0x800a1391 - JavaScript runtime error: 'D' is undefined
Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d
0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.
Parameter name: data
Exception was thrown at line 715, column 3 in eval code
0x800a1391 - JavaScript runtime error: 'M' is undefined
Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d
0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.
Parameter name: data
Exception was thrown at line 697, column 3 in eval code
0x800a1391 - JavaScript runtime error: 'b' is undefined
Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d
0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.
Parameter name: data
Exception was thrown at line 661, column 3 in eval code
0x800a1391 - JavaScript runtime error: 'w' is undefined
Exception was thrown at line 4271, column 10 in http://localhost:51142/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlU3wH2kOYuAUbp-5q3LuaD4nJMrF0SS33e26gOqzl07HhDrDM2bw0azVrQc6hyOoWF0zsZLeMiVZzW95Wjc5SdnhfGjV-C_jRm9dyzOPKjMI0&t=ffffffffda74082d
0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.
Parameter name: data

Any help will be much appreciated.

Thanks, Anup

推荐答案

这篇关于Ajaz自动完成功能无法在visual studio 2013中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆