HtmlAnchor is a link that remains highlighted after being clicked. The application is on the website background management interface. After you click the menu on the left, the menu remains highlighted.
To implement this function, it takes a lot of time for Insus. NET. Because the tag seems to have only one instantaneous state, it is difficult to catch up with it.
The following is the implementation process of Insus. NET. The basic part is to use this demo as material: http://www.cnblogs.com/insus/p/3205293.html.
To control the status of HtmlAnchor after clicking, we must know that HtmlAnchor has been clicked. In the previous demonstration, we can see that the href values of each HtmlAnchor are different. From this point, we can determine which HyperLink operator points. Only the href value can be found, and we can change the style of the link ).
OK, Insus. NET first writes an interface ):
This interface only has one write-only attribute. You can obtain the address of the webpage that opens the current page from the webpage opened by the link. Who will implement these interfaces? It can be seen from the interface that it is a value assignment. Therefore, we use the MasterPage master for implementation.
The following example shows the link HtmlAnchor on the master page. Insus. NET uses the override void Render () method to override the HtmlAnchor of the master page.
Then, link the target plane, GET Request. RawUrl, and pass it to the master MasterPage.
All pages (1 ~ 5). aspx. cs all need to use the above Code to give the address of the current page to the master.
The following is an example of the demo.