Click here to Skip to main content
15,306,032 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Is it possible To use AJAX in C# windows form application.
Posted
Updated 6-Nov-21 18:10pm
Comments
   
What it would possibly mean? :-)
—SA
ZurdoDev 31-Dec-13 20:34pm
   
Why?

The question does not seem to make any sense, and this is not about possibility or lack of possibility. The term Ajax is related to Javascript and nothing else: http://en.wikipedia.org/wiki/Ajax[^].

The question would make some sense if you somehow hosted some Javascript interpreter and runtime system in your System.Windows.Forms application, but it's hard to believe: if you worked at that level of sophistication, it would be apparent for you that you could use everything Javascript offers, including Ajax, so you would not ask such a question.

Rather, I suspect that you need to send an HTTP request to some site or Web service and receive HTTP response. But this can be done using the class System.Net.HttpWebRequest:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.webrequest(v=vs.110).aspx[^].

And of course this is totally unrelated to System.Windows.Forms or any other UI framework/library or any particular application type.

—SA
   
Comments
joginder-banger 12-Nov-14 8:03am
   
you are Great Sir.....i check your personal website i enjoy it.
Sergey Alexandrovich Kryukov 12-Nov-14 10:51am
   
Thank you.
—SA
They are simply inquiring about reading JSON data over WinForms, much like a web document. The OP's question in the year of 2021 is more than interpreted with next to no confusion in this regard, so I'm surprised to see the level of "what is this language you speak of".

Sure threw me off the wagon on this criteria, so lets clear the smoke and irrelevancy and jump to the Newtonsoft JSON library where this should of originally been referred to in hopes of resolution or a straight answer.

For reference:
NewtonSoft, JSON.NET, and many more. Just search Nuget repo and you will be well on your way. Of course this OP was 2013, so for those of you who are currently inquiring.. check those out. De-serialization is your goal.
   
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900