|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
PathTrackingControl - ASP.NET Server controlThis article was contributed by Ralph Varjabedian.
Environment: Any environment running ASP.NET We were developing several projects in the company I work for and we needed to include a powerful navigation system to our web applications but without much coding. so I decided to develop the 'PathTrackingControl' which is an ASP.NET Server control to provide such navigation to our applications. The challenge was to do as little coding as possible when using this control and the result was all you need to do is Drag n' Drop this server control to your pages and you got yourself a working navigation system. This control is the same control used in our automated hosting billing solution, PanelBill. How to use it: To use this control, all you have to do is Drag n' Drop it on the web pages that you want to have navigation in and that's about it. Run your web application and start browsing your page and watch how the PathTrackingControl follows your path and gives you an easy "Crumb Chips" map into your site. How does the control display its data/features? The control will display for each page visited: A link (an anchor to its URL), a tool tip and possibly an icon (take a look at the snapshot, you can see the icons). The link is extracted from the actual request to the page. The tool tip is extracted from the page's contents itself at runtime; it is extracted from the following meta-tag: The icon is also optionally included in the output of the control if the page visited has the following meta-tag: In one of our projects, the code is a little different, the tooltips and the icons are extracted from the database according to the page's url. How does the control work? The control's source code is well documented; try to look at the code as you read the rest of this paragraph to understand the control better. The control's RenderContents method is overridden. Inside method RenderControls, three private methods are called, I will talk about the first method The final third method Now, back to the first method How to customize the looks of the control to your needs? The control has several properties that I want to bring your attention to, using these properties you should be able to make the control output the path in any way you desire. I will explain the anatomy of items generated by the control after the description of the properties to give you a better understanding of some of the properties. LinkCSSClass:
TableCSSClass:
TableRowCSSClass:
PreItemSeparatorInLink:
PreItemSeparatorOutLink:
PostItemSeparatorInLink:
PostItemSeparatorOutLink:
Anatomy of the generated links: This is a sample of the generated HTML code by the control, the places of where the properties go are in bold, Italic and in dark red color. <div align="center"> I hope you find this control useful to you. If you use this control, we would appreciate a link to our site http://www.bytesurge.com *************************** IMPORTANT NOTE ***************************** DownloadsDownload the latest source and demo project hereHistoryDate Posted: February 1, 2005
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||