,,,,,
,,itisdifficulttocatchit.
ThefollowingistheprocessofInsus.NETimplementation.Thebasepartisusedasthedemonstrationdata:.
InordertocontroltoclickafterthestateofHtmlAnchor,wemustknowthataHtmlAnchorisclicked.Fromthefrontofthedemo,youcanseeeachHtmlAnchorhrefvalueisnotthesame,canbejudgedbythispointtotheoperatorwhichisaHyperLink.Onlytofindthevalueofhref,wecanfindwhichonelink,wecanlinktochangeitsstyle(style).
OK,Insus.NETwroteaninterface(interface):
Thisinterface,onlyawriteonlyproperty,wecanlinktoopenthewebpage,youcangettothewebpageaddresstoopenthecurrentpage.Thisinterface,whoistoimplement?Fromtheinterfacecanbeseen,itisthebehaviorofassignment.Therefore,weuseMasterPagetoimplementtheparentversion.
Thefollowingdemonstrationisthekeypart,isinthemasterpage,findthelinkHtmlAnchor.Insus.NETistheuseofoverridevoidRender(HtmlAnchor.)methodtooverridetheparentpage
Then,tolinkthetargetsurface,gettheRequest.RawUrl,andtomasterMasterPage.
AllPage(1~5).Aspx.csallneedtousethecodeabove,thecurrentpageaddresstothemaster.
Hereagainthedemonstrationeffectisattached,istheendofthepresentation.