Online courses in ASP.NET MVC, ASP.NET Core, and Design Patterns conducted by Bipin Joshi. Read more...
Learn ASP.NET MVC / Core, jQuery, Angular, and Design Patterns through our online training programs. Courses conducted by Bipin Joshi on weekends. Read more details here.

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

Introduction

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 a yogi having 21+ years of experience in software development. He conducts online courses in ASP.NET MVC / Core, jQuery, AngularJS, and Design Patterns. He is a published author and has authored or co-authored books for Apress and Wrox press. Having embraced Yoga way of life he also teaches Ajapa Meditation to interested individuals. To know more about him click here.

Get connected : Twitter  Facebook  Google+  LinkedIn

Posted On : 05 Apr 2004



Tags : ASP.NET Web Forms Server Controls Custom Controls