is there is any possibility to work with jquery ajax in windows forms.....for some search in page....
if possible,any one can provide the samples or links here.
Thanks in advance.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pradeep ShetRank #595 · 4K reputationPosted Nov 12, 2014, 2:39 AM EST
Joginder BangerRank #360 · 7K reputationPosted Nov 12, 2014, 2:53 AM EST
Rajeev KumarRank #1,334 · 1.3K reputationPosted Mar 16, 2023, 6:43 AM EDT
No we ca'nt use jquery in winform.
Tuhin PaulRank #7 · 71.9K reputationPosted Mar 16, 2023, 10:22 AM EDT
Hello,Yes, it is possible to use jQuery AJAX in Windows Forms applications using the WebBrowser control. Here's a sample code snippet that demonstrates how to make a jQuery AJAX call in a Windows Forms application
private void button1_Click(object sender, EventArgs e) { webBrowser1.Navigate("about:blank"); webBrowser1.Document.Write(" webBrowser1.Document.InvokeScript("eval", new object[] { "$(document.body).load('http://example.com/search?q=test', function() {" + "alert('Search completed!');" + "});" }); }Tuhin PaulRank #7 · 71.9K reputationPosted Mar 16, 2023, 10:23 AM EDT
In my above code we first navigate the WebBrowser control to a blank page, and then write HTML code that includes a reference to the jQuery library. We then use the Document.InvokeScript method to execute a JavaScript code that uses jQuery to load the search results from a URL and displays an alert message when the search is completed.
The Document.InvokeScript method can be used to execute any JavaScript code, so you can use it to make any AJAX call using jQuery or any other JavaScript library.