I am using jQuery to publish with AJAX on another ASP page. I need this ASP page to return the full html page. Or I can just send it back (I just need a status). Here is my function.
$.ajax({ url: "X.asp", cache: false, type: "POST", data: queryString, success: function(html){ $('#x_'+Num).append(html); } });
If this is just the required value, I would just use Json (JQuery has a dedicated method for this: $. GetJSON () ).
No, you don't need your ASP page to return a full html page, just a value in simple JSON notation.
, ( ), X.asp ContentType = "text/plain", HTML.
Well, in general, the goal of AJAX is IMHO that you do not need to return the entire page. The server just sends the simple answer you need.
You can return something from the backend, I personally prefer JSON, but you must specify the dataType property in the $ .ajax parameters
Using AJAX, you can return anything, even binary data. Although it was designed for XML, you can use it for everything that you can pass through a web server. However, HTTP requests are expensive, so don't abuse them too much!
Source: https://habr.com/ru/post/1699077/More articles:Is there a way to fake an id column in NHibernate? - nhibernateCalling internal methods in a trust tool - c #Невозможно установить текстовое поле на UILabel - objective-chttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1699075/redirects-to-defaultaspx-instead-of-xxxaspx-after-logging-into-app-using-login-control&usg=ALkJrhgVE1fae567XWCZrvFXcAzRzGo68Ahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1699076/how-to-bind-controls-to-the-datagridview&usg=ALkJrhgbBHPH4KjEj-E6fL5gbIXwsuWLQwDoes Python 2.5 include a package for converting an XML document? - pythonRotation Components: Vertical Text Question - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1699080/apache-backup-ldap-repository-with-modldap&usg=ALkJrhjN3kueu-fCahevTuLihhX6foaVpgjQuery - open all links on a page - jqueryHow to add xml element in Java 1.4 - javaAll Articles