C#
  Home arrow C# arrow Page 2 - Creating an RSS Feed with ASP.Net Written ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
VeriSign Whitepapers 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
C#

Creating an RSS Feed with ASP.Net Written in C#
By: Luke Niland
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 20
    2007-07-02

    Table of Contents:
  • Creating an RSS Feed with ASP.Net Written in C#
  • Creating the Pages
  • Code Behind Page
  • The Data Repeater

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Creating an RSS Feed with ASP.Net Written in C# - Creating the Pages


    (Page 2 of 4 )

    There will be two files in this project. One will contain an ASP.Net repeater control that will put the data into the XML file. The other will be a code behind page that contains all the logic for getting the data. You can create these pages in an IDE like Visual Studio or Visual Web Developer, or just use a plain text editor. If you are using a text editor, you will have to copy the pages onto your IIS server in order to test them.

    First of all, create a page called rss.aspx. This is the page that contains the data repeater control, at which your users will actually point their RSS reader applications.

    At the very top of the page, you need to have the line shown below. It is the page declaration statement, and tells the page how to behave:

    <%@ Page language="c#" CodeFile="rss.aspx.cs" ContentType="text/xml" AutoEventWireup="false" Inherits="SyndicationDemo"%>

     

    The first declaration is the language; it tells you what code to expect on this page. It is set to C#.

    The next part of this is the CodeFile section. It is telling us the code for the page is located within another file, in this case the rss.aspx.cs file.

    The next section is important; it is setting the ContentType of the page. If this were a normal web page you wouldn't have to change it (it defaults to HTML), but we want to send XML to the browser (or RSS reader), so we make it text/xml.

    The Inherits section tells the page what class to inherit from the code behind page. In the case it's the SyndicationDemo class, which we will be writing next.

    We will now create the code behind page. It makes more sense to do this before we add the repeater to this page, so you can see what the repeater is actually outputting.

    More C# Articles
    More By Luke Niland


       · Hi, Hope you like the article and find it useful, its a fairly straight forward...
       · Great explanations. Not like most on the net. Anyway, just a small correction in...
       · Hi,Glad you liked the explanations i try to keep them as simple as possible....
       · How Aboutdata = data.Replace("\"", """);
       · However...you lost me at step 2. Not your fault, but it all looks like Greek to...
     

    C# ARTICLES

    - Exceptions in C#
    - Overriding versus Overloading
    - Value Types and Reference Types
    - Defining Member and Type Visibility
    - Managing Files in C#
    - Working with Windows Registry in C#
    - Lossless Image Resizing in C#
    - Lossless Image Converting in C#
    - Creating an RSS Feed with ASP.Net Written in...
    - Polymorphism in C#
    - Inheritance in C#
    - C# Events Explained
    - C# Delegates Explained
    - C# StreamReader and StreamWriter Explained
    - C# FileStream Explained

    Click Here




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway