Asp.net| programming
Author: Tui (Richard Troy-rex, Ricktroy)
Contact: RickTroy@126.com, http://ricktroy.cnblogs.com/
Yesterday has been looking for a simple solution to the Ajax use in ASP.net V1.1.4322, but found that the ASP.net page model is very "weird." All the events and internal methods that it has, No one seems to be able to charge a solution but not refresh the page. That is, use the XMLHttpRequest on the page for HTTP GET, Page_Load event is not executed (because XMLHttpRequest responsetext is not Page_ Test results in the load code).
Later, you want to use HTMLControl, then use __doPostBack (eventtarget,eventargument), raisepostbackevent in script, but once the form is submitted, the page is refreshed ( It turned out to be the common sense of HTML forms, which had never really been studied before. However, even HTTP get XMLHttpRequest using HTMLControl does not solve the problem (Ibid. Page_Load event does not respond).
P.S: For server postback that want to imitate WebControl, you can use the client to write two hidden input, the name is __eventtarget and __eventargument, and then use the script __doPostBack ( control,argument); The syntax of the postback event is triggered.
Borrowed someone else's professional ASP. NET knows that in the ASP.net model you can use the IHttpHandler and IHttpModule two classes for HTTP request processing, but these two classes require precompilation, so even if you can write a response library its extensibility is not optimistic.
Please advise, is there any event and method can be directly in the page response and processing HTTP requests?
Or who can provide some form submit () method to pass data form,
Because XMLHttpRequest can send at the time of the request, if we know the form of submit submission data, it seems that we can go over the refresh submission data (but I have also considered this to be a security risk).
Please advise us.