ASP.NET Core 5.0 : MVC, Razor Pages, Web API, EF Core, Blazor, Design Patterns, and more. Private online coaching for software developers. 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 an independent software consultant, trainer, author, yoga mentor, and meditation teacher. He has been programming, meditating, and teaching for 24+ years. He conducts instructor-led online training courses in ASP.NET family of technologies for individuals and small groups. 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 : Facebook  Twitter  LinkedIn  YouTube

Posted On : 05 April 2004

Tags : ASP.NET Web Forms Server Controls Custom Controls

Subscribe to our newsletter

Get monthly email updates about new articles, tutorials, code samples, and how-tos getting added to our knowledge base.


Receive Weekly Updates