473,385 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

RSS Feed selector

Bo
I found an example on
http://geekswithblogs.net/evjen/arch...7/23/8792.aspx but does this
work correctly for you guys?

If I select a different feed from the dropdown and then try to load the
first in the dropdown called Top News that feed is not loaded. It still
shows the previous selected instead.

Do you know what I should do to fix that error?

<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<script runat="server">

Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e
As System.EventArgs)

XmlDataSource1.DataFile = DropDownList1.SelectedValue

End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Reuters News</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<span style="font-size: 10pt; font-family: Verdana">Select News
Topic:<br />

<asp:DropDownList ID="DropDownList1" Runat="server"
AutoPostBack="True"

OnSelectedIndexChanged="DropDownList1_SelectedInde xChanged">

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/topNews">Top News</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/businessNews">Business
News</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/domesticNews">U.S.
News</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/worldNews">International
News</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/ElectionCoverage">Politics</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/Entertainment">Entertainment</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/technologyNews">Technology</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/scienceNews">Science</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/sportsNews">Sports</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/healthNews">Health</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/oddlyEnoughNews">Oddly
Enough</asp:ListItem>

<asp:ListItem
Value="http://www.microsite.reuters.com/rss/lifeAndLeisureNews">Life &amp;
Leisure</asp:ListItem>

</asp:DropDownList>

</span>

<br />

<br />

<asp:DataList ID="DataList1" Runat="server"
DataSourceID="XmlDataSource1"

BorderColor="Tan" BackColor="LightGoldenrodYellow"
BorderWidth="1px"

CellPadding="2" ForeColor="Black" Width="600px">

<ItemTemplate>

<asp:Label ID="Label1" Runat="server" Text='<%#
XPath("pubDate") %>' ForeColor="gray" Font-Bold="True"

Font-Names="Verdana"
Font-Size="XX-Small"></asp:Label><br />

<asp:HyperLink ID="HyperLink1" Runat="server" Text='<%#
XPath("title") %>' NavigateUrl='<%# XPath("link") %>'

Target="_blank" Font-Names="Verdana"
Font-Size="X-Small"></asp:HyperLink><br />

<%# XPath("description") %>

</ItemTemplate>

<AlternatingItemTemplate>

<asp:Label ID="Label3" Runat="server" Text='<%#
XPath("pubDate") %>'

ForeColor="gray" Font-Bold="True"

Font-Names="Verdana" Font-Size="XX-Small"></asp:Label><br
/>

<asp:HyperLink ID="HyperLink2" Runat="server"

Text='<%# XPath("title") %>' NavigateUrl='<%# XPath("link")
%>'

Target="_blank" Font-Names="Verdana"
Font-Size="X-Small"></asp:HyperLink><br />

<%# XPath("description") %>

</AlternatingItemTemplate>

<AlternatingItemStyle
BackColor="PaleGoldenrod"></AlternatingItemStyle>

<ItemStyle Font-Names="Verdana" Font-Size="X-Small"></ItemStyle>

</asp:DataList>

<asp:XmlDataSource ID="XmlDataSource1" Runat="server"

DataFile="http://www.microsite.reuters.com/rss/topNews"

XPath="rss/channel/item">

</asp:XmlDataSource></div>

</form>
</body>
</html>
Jul 16 '08 #1
0 1088

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Richard Barnet | last post by:
Dear CSS gurus, My question regarding 'the cascade' is a simple one, but one that I haven't heard anyone talk about before: When cascading (for instance, when applying two linked stylesheets),...
4
by: Zane | last post by:
Hi, I am having some grieve with the following part of my CSS, basically when using a composite selector using an ID as the first element the it doesn't display the expected results. Am I doing...
3
by: Lian Liming | last post by:
Hi, The language in my web site may be Simplified Chinese or English. I want to define different styles for each language. For each language, the http header is different. <meta name="language"...
2
by: Chris Sharman | last post by:
See http://services.ccagroup.co.uk/testform.htm Looks as intended in firefox, is valid (bulk of inputs centred in a div occupying the left half of the page). ie ignores the child selector,...
8
by: sajid | last post by:
The CSS 2.1 Specification describes how to sort a list of selectors in order of specificity, but it doesn't provide a method to calculate the specificity of a single selector in isolation. I've...
3
by: JakDaniel | last post by:
is it possible, create a selector as alias of another selector... (maybe) in another stylesheet file? ex: html page .... <link rel="stylesheet" type="text/css" href="style1.css" /> <link...
6
by: _googlepost | last post by:
I have some CSS that goes something like this: table.TableStyle {font-family: "Helvetica", "Ariel"; background- color:white; border-collapse:collapse;} table.TableStyle COLGROUP { background-...
0
by: blaine | last post by:
Hey everyone, I was hoping to see some people out on the python list that are familiar with MDP (Modular Toolkit for Data Processing - http://mdp-toolkit.sourceforge.net/)? I am wanting to...
4
by: Blake Garner | last post by:
I'm looking for suggestions on how to approach generating rss feed ..xml files using python. What modules to people recommend I start with? Thanks! Blake
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.