Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspdotnet_website_programming thread: RE: Strange doings with navigator server control


Message #1 by "Charles Walsek" <cwalsek@e...> on Sun, 4 Aug 2002 23:39:48
At first I too had trouble implementing the Navigator, but managed to get 
thru it.  My background is mostly VC++ / MFC.  No ASP experience so just 
about all this stuff is new for me.  

I've been implementing the project with Visual Studio.  A great way to 
learn the technology & the tools.  For the Navigator I added a new Web 
Control Library Project (I called it CustomControls) to the solution, and 
then renamed Class1 to MyNavigator.  I had to replace the base class 
generated by Studio to the one showed in the book, and add the appropriate 
Web References.  Next I added 2 fields (using the right-click Visual 
Studio contect menu) and two properties (source & transformation), just 
like the book showed.  

From there I used the Solution Explorer to find the two Render & OnInit 
methods to over-ride.  I copied in the code that was in the book.  The 
real magic starts after getting a good build.

I did a right-click on the VS Web Forms title to enter the Customize 
Toolbar context menu.  I added the MyNavigator control to the Web Forms 
(had to use the browse dialog to get the control).  Finally, I dragged the 
MyNavigator control onto the web page and wow!  The source and transform 
properties showed up in the Property Window.  Not only that, but Visual 
Studio inserted the Register directive to the html file.  

The namespace I'm using is not exactly what the book calls for, but at 
least it works.  Hope I don't run into any downstream problems because of 
it. 




  Return to Index