April 2018 : Instructor-led Online Courses in ASP.NET MVC / Core and Design Patterns Read more...
Registration open for April 2018 batches of ASP.NET MVC and Design Patterns instructor-led online courses. Conducted by Bipin Joshi on weekends. Register today ! Click here for more details.

Developing a Web Ring using ASP.NET Web Service and User Control


Web ring is nothing but a set of related sites linked to each other in some way. Each site participating in the web ring puts a web ring navigator on their pages (typically at the bottom) which allows the visitors to navigate the web ring. This code sample will tell you how to create such a web ring user control using ASP.NET.

Functionality of Web Ring

  • Navigating to the previous site from the web ring
  • Navigating to the next site of the web ring
  • Navigating to any random site from the web ring
  • Join the web ring
  • Go to the hub of the web ring. Hub is typically the home page of a web site that is maintaining the web ring.

Code Files

The VS.NET project provided along with this article contains following files:

WebRingControl.ascx This is the main web user control file that provides web ring user interface. All the participating sites must use this user control on their web sites.
WebRingWebService.asmx This web service is consumed by the user control to get next site, previous site and random site.
Hub.aspx This is web ring hub.
Join.aspx This is a page where in user can join the web ring. You can improve this page as per your requirement.
WebRingHelper.cs This class contains functionality of navigation such as next site, previous site and random site. This class is used by the web service.
WebForm1.aspx...WebForm4.aspx These are test forms representing web sites from the web ring
WebRingTable.sql SQL Server script for creating WebRing table in any database

Bipin Joshi is a software consultant, trainer, author and yoga mentor having 22+ years of experience in software development. He also conducts online courses on ASP.NET MVC, ASP.NET Core and Design Patterns. He is a published author and has authored or co-authored books for Apress and Wrox press. Having embraced the Yoga way of life he also teaches Ajapa Yoga to interested individuals. To know more about him click here.

Get connected : Twitter  Facebook  Google+  LinkedIn

Posted On : 05 April 2004

Tags : ASP.NET Web Forms Server Controls Custom Controls