In my two articles, I introduced the implementation of the SMARTNAVigation attribute of the Page class (.NET Framework
1.1 /
2.0 Implementation of SmartNavigation), although M $ is very clever, this "stealing" also brings some negative impacts. They are mainly manifested in these aspects:
1, the page can no longer use the Forward and Backward provided by the browser, because these two action functions on the Window.Document object, and the page that we actually submit is the iframe in this document, which cannot be F & B. This problem is very depressed because the user can't make Backward, which will lose a lot of forms of form that fail to submit success during submission;
2, troubleshoot the debugger, we can't see the true HTML source code of the current page, because the information of the server Response is still in IFRAME, we can only see the old information in Doucment;
3. For the case of the original page, the smartnavigation is affirmed by the SMARTNAVigation. Just after the page is updated, since the Doucment does not have updated, there is no processing of dynamically generated HTML objects.
4, compatibility, current SmartNavigation does not consider compatibility issues, like Opera, Konquer, etc., cannot correct Navigate;
5. You cannot get the request.urlreferRer quote, urlreferrer is always empty;
6. After submitting the form, use the Rander Alert (...) to generate a page of the user prompt, when using the smartnavigation page, the expected Alert window cannot be displayed after commit;
7. Submit for some special symbols Generate bugs, for example, in the page using SmartNavigation, if you write a "` "(click the key below the ESC below) to the TEXTBOX. After Submit, TextBox disappears, in Submit, the textbox appears, but the value is no longer;
8. CSS Styesheet written in
, will be lost after the first Submit, which can be seen from the SMARTNAVigation source code of 1.1, when he is handling , only9, the defaultRedirect property cannot be executed correctly, this can be viewed by M $
KB813831.
In general, the emergence of SmartNavigation is still nice, but because it is really complicated, there is also a lot of problems. So use the SmartNavigation function must be cautious, and you don't think about the page that is too complex and embedded in a large number of JScript scripts.
Luo Yi for a long time, the real protagonist has not yet been played, it is really failure.
. Let's take a look at my "smartnavigation" super slimming slimming version:
Actually, it is too simple, that is, the scrolltop, response, and response after the SET this scrolltop, but I made a control, let the page have Navigate to the page. code show as below:
Using
System;
Using
System.collections;
Using
System.componentmodel;
Using
System.drawing;
Using
System.text; using
System.Web;
Using
System.Web.ui;
Using
System.Web.ui.design;
Using
System.Web.ui.WebControls;
Using
System.Web.ui.htmlControls;
Namespace
Birdshome.web.ui.webcontrols
{/ ** /////