AJAX,IIS,ASP.NET [英] AJAX, IIS, ASP.NET

查看:147
本文介绍了AJAX,IIS,ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我倾我的脚趾到网络的发展。根据建议的各个位,我会先得到它的HTML,CSS和JavaScript的句柄。

I'm dipping my toes into web development. Based on various bits of advice, I'm going to start by getting a handle on html, css and javascript.

我感兴趣的阿贾克斯,我已经看在客户端code和看起来直截了当不够,我稍微感到困惑我做什么在服务器端。

I'm interested in Ajax, I've had a look at the client side code and that looks straight forward enough, I'm slightly confused about what I do on the server side.

我使用的是IIS和AS​​P.NET。我有一个谷歌,但我无法找到任何东西是简单或电流。有很多其他的事情谈Ajax工具包,我认为这是使用Ajax控件(并可能退役?)似乎是基于旧版本的,我不相信。

I'm using IIS and ASP.NET. I've had a google but I can't find anything that is either simple or current. There's a lot of talk about the Ajax toolkit, which I believe are controls which use Ajax (and may be retired??) Everything else seems to be based on old versions which I don't trust.

所以,真的很简单地说,我有什么做的IIS向AJAX调用回应?

So, in really simple terms, what do I have to do in IIS to respond to an AJAX call?

快速之外,我相信我们可以使用JSON对象序列化?我想我并不需要在得到一个简单的示例运行的利益?

Quick aside, I believe we can use JSON for object serialisation?? I assume I don't need to in the interests of getting a simple sample running?

所以,我有一个Ajax调用,将有一个参数,我想回到基于参数东西。什么是最简单的code实现与IIS和AS​​P.NET?

So I have an Ajax call which will have one parameter, and I want to return "something" based on the parameter. What is the simplest code to achieve that with IIS and ASP.NET?

感谢

推荐答案

这是AJAX调用,基本上只是一个普通的电话到您的网站。唯一的区别是浏览器如何处理它 - Ajax调用完成与使用Javascript(歼在AJAX)的背景,然后做一些与数据。你可以采取你正在做一个AJAX调用的URL,并把它放在你的地址栏中,它会返回完全相同的数据。所以,基本上,你在服务器端究竟是什么,你会做什么,就好像它是一个被提交的表单,例如。

An AJAX call is basically just a regular call to your website. The only difference is how the browser handles it - AJAX calls are done in the background with Javascript (the J in AJAX) and then does something with the data. You could take the URL that you're doing an AJAX call with and put it in your address bar and it'll return the exact same data. So, basically, what you do on the server side is exactly what you would do as if it were a form being submitted, for example.

据对象序列化,是的,JSON可以做到这一点。

As far as object serialization, yes, JSON can do that.

这篇关于AJAX,IIS,ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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