我对 ASP.NET 的 AJAX 完全陌生。如何检查我的服务器上是否安装了 AJAX 客户端框架?我使用的是 Visual Studio 2010,ASP.NET 目标框架是 3.5。如果未安装,那么可以免费下载并安装 ASP.NET 2.0 吗?详细的帮助将不胜感激。
我面临以下问题:请查看下面的代码:
>
>>
>>
<脚本 src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"
>>
>< br>
<正文
>
>
<脚本 src="/PSTest1/ScriptResource.axd?d=DvXzLAuBdskYlxKlDkfcX8lFN-isZoYYhwzWQ30kz1wvf3Dj_xhMp8sWyiNF4I0Wwd7ZFgznqsOqVBwLjV_e-OD3WoTK41QMAxZe28c_Fjw 1&t=fffffffff948d308" type="text/javascript"
>>
<脚本类型=“text/javascript”
>
//<代码>>
>
<脚本 src="/PSTest1/ScriptResource.axd?d=DvXzLAuBdskYlxKlDkfcX8lFN-isZoYYhwzWQ30kz1wvf3Dj_xhMp8sWyiNF4I0Wa-X8RUnO7myv4R_LVgNXGlN0jNB4gWBd9KVIV5JCR7EPe-ny 78LJC5r8gRrhPIGv0&t=ffffffffff948d308" type="text/javascript"
>< /脚本
>
<脚本类型=“text/javascript”
>
//<代码>>
>
到底是什么问题,因为同一个 js 文件在其他平台而不是我的平台上产生了预期的效果。我正在使用 .NET 3.5、ASP.NET 2.0、Visual Studio 2010
I am completely new to AJAX for ASP.NET. How do I check if AJAX client side framework is installed on my server? I am using Visual Studio 2010 and ASP.NET target framework is 3.5. If it is not installed then is it free to download and install for ASP.NET 2.0? Detailed help would be much appreciated.
I am facing the following problem: Please have a look at the code below:
<html xmlns="http://www.w3.org/1999/xhtml"
>
<head
><title
>
</title
><meta http-equiv="content-type" content="text/html; charset=utf-8" /
>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"
></script
>
<script src="../Files/scriptname.js" language="javascript" type="text/javascript"
></script
>
<body
>
<script src="/PSTest1/WebResource.axd?d=Gv665v31f2LmvKc6l5ZtYg2&t=633739595980000000" type="text/javascript"
></script
>
<script src="/PSTest1/ScriptResource.axd?d=DvXzLAuBdskYlxKlDkfcX8lFN-isZoYYhwzWQ30kz1wvf3Dj_xhMp8sWyiNF4I0Wwd7ZFgznqsOqVBwLjV_e-OD3WoTK41QMAxZe28c_Fjw1&t=fffffffff948d308" type="text/javascript"
></script
>
<script type="text/javascript"
>
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]
>
</script
>
<script src="/PSTest1/ScriptResource.axd?d=DvXzLAuBdskYlxKlDkfcX8lFN-isZoYYhwzWQ30kz1wvf3Dj_xhMp8sWyiNF4I0Wa-X8RUnO7myv4R_LVgNXGlN0jNB4gWBd9KVIV5JCR7EPe-ny78LJC5r8gRrhPIGv0&t=fffffffff948d308" type="text/javascript"
></script
>
<script type="text/javascript"
>
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager1', document.getElementById('aspnetForm'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);
//]]
>
</script
>
What exactly seems to be the problem as the same js file produces a desired effect on some other platform and not mine. I am working on .NET 3.5 , ASP.NET 2.0, Visual Studio 2010
发布评论
评论(2)
如果您使用的是 3.5,则应安装它。我相信它在 System.Web.Extensions dll 中。
It should be installed if you are using 3.5. I believe that it is in the System.Web.Extensions dll.
我认为你在谈论两件不同的事情。
.NET Framework 3.5 及更高版本包含 .NET AJAX 库。另外,如果您仅限于使用 2.0,则可以从 Microsoft 下载 AJAX 扩展: AJAX Extensions 1.0
如果您具体讨论客户端/浏览器是否支持 AJAX(如 XMLHttpRequest 对象),有许多资源可以提供会有帮助,但检索正确对象的基本 (js) 语法是:
当您使用 .NET AJAX 库时,将为您生成此(或类似)代码。
I think you're talking about 2 different things.
The .NET framework version 3.5 and above include the .NET AJAX libraries. Also, if you are limited to using 2.0, you can download the AJAX Extensions from Microsoft: AJAX Extensions 1.0
If you're talking specifically about whether or not a client/browser supports AJAX (a la the XMLHttpRequest object), there are many resources that will help, but the basic (js) syntax for retrieving the correct object is:
When you use the .NET AJAX libraries, this (or similar) code will be generated for you.