如何使用ASPX输出AJAX调用的文本 [英] How to use ASPX to output text for AJAX call
问题描述
感谢阅读!
ASP.Net通过自己的好东西为您提供AJAX功能。
我不需要使用这些好东西。
我需要从客户端进行异步调用,直接从服务器返回一个字符串。
我知道您可以像在Response.ContentType =some option中那样将ASPX调用的输出类型更改为服务器,但到目前为止我还没有找到我需要输出的确切内容一个简单的字符串(不能相信)。
你能帮我一个基本的代码模型输出一个简单的字符串,然后我可以从客户端获取?
VB或C#就好了。
我不需要客户端调用(AJAX),除非你需要一些upvotes来自公共:)
非常感谢你的帮助!
< blockquote>请查看如何使用ASP用于JSON或XML响应的.NET WebForm
希望有所帮助!
谢谢
Thanks for reading!
ASP.Net provides you AJAX functionality through it's own goodies.
I need not to make use of these goodies.
I need to make an asynchronous call from the client and get back just a string straight from the server.
I know you can change the output type of an ASPX call to the server as in Response.ContentType = "some option", but so far I haven't been able to find exactly what I need to just output a simple string (can't believe it).
Can you help me with a basic code model to output a simple string that I can then get from the client side ?
VB or C# is just fine.
I don't need the client call (AJAX), unless you want some upvotes from the public :)
Thank you so much for your help!
Please check How to Use ASP.NET WebForm for JSON or XML Response
Hope that helps !
Thanks
这篇关于如何使用ASPX输出AJAX调用的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!