Developing an ASP.NET AJAX Based RSS Reader
page 4 of 10
by Xianzhong Zhu
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 38455/ 75

Data Tier Design

With the above goals in mind, let us now shift our attention to the database design.

Database Design

Launch Visual Studio 2005, and then select menu item "File | New Website…" to create a new website using the template named "ASP.NET AJAX-Enabled Web Site." Name the project AjaxRss (select Visual C# as the built-in language). After that, the system should automatically add references to the necessary assemblies: Microsoft.Web.Preview.dll and System.Web.Extensions.dll.  You can see a ScriptManager server control (the headquarters of whole ASP.NET AJAX framework) automatically added to the page.

Now, right click the project, select "Add new Item…" and then choose the template "SQL Database" to create a database named RssReader.mdf.  In this application we add to it only one table named RssStore (whose fields are detailed in the following table).  After that we are also to create four simple stored procedures, DeleteRecord, GetAllRecords, InsertRecord, UpdateRecord, which are associated with the typical CRUD database operations.  We will not dwell much on these since our main interests do not lie here.

Table 2. Structure for table RssStore.

Field name





Primary Key



The RSS channel name



The RSS channel URI (or URL)

Web Service Design

Next, we will write a web service to be consumed from the browser side in ASP.NET AJAX way.  In this sample we let the service return an array of object RssInfo (serving as the OOP wrapper for the record in the database table RssStore).

Right click the project, choose "Add new item" and create a new Web Service named MyDataService.asmx.  Next, we are to open file BookDataService.cs and add all our required WebMethods: DeleteRecord, GetAllRecords, InsertRecord, and UpdateRecord, all of which are quite similar to those in my previous article published at Thus, we choose to omit the analysis with them.  For the associated details, please refer to that article and download the source code at this end of this article.

Next, comes the user interface design phase.

View Entire Article

User Comments

Title: Trouble with Sample Code   
Date: 2009-04-09 3:28:34 PM
Hello Xianzhong, I recently downloaded your sample code, did a little alteration to it and then compiled it. When I went to view it in a browser, after clicking on the "Add the RSS info" button, I get a javaScript error.

var datatable =g_RSSNameList.get_data(); throws a null reference exception.

After 2 days of trying to debug this, I am finally contacting you. Any ideas on how to troubleshoot this?

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-07-15 5:54:48 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search