Recently received a task of leaving a staff, a good framework of the ERP system, looked at two days, say something to see, The entire project directory I did not find an. aspx suffix file, all static HTML files, and then found that he used jquery simply look at the headache, but probably can understand, found a possible people will be interested in things, he in the static interface through the JS object directly in the DLL to get data from the database and through JS loaded out , I was blind, and his approximate process was:
Set up a number of JS objects (a table in the database corresponding to one), and for this object has added a lot of corresponding methods in the DLL, such as a DLL in the user table to modify the user password, then he will define a user table object, and add a method to change the password for this object such as JS in this method is Uppwd (), and this method of the method name and parameters corresponding to the DLL, in JS call this method, but he called uppwd when more than one parameter, It is the namespace name of the method that the user modifies the password in the DLL. Class name, the key is here, he called a JS method, this method has not read, as if to do what processing, code huge, will indirectly call the corresponding method of the DLL, so very happy, but the source code can not be copied out, the company computer is not networked, Also can not plug in the U disk, so intends to take a few phone source code photos, 51 finishing test, no problem in the hair to see you
Read data from the database in a pure static interface (HTML) by invoking a method in the DLL with JS