L
Lasse Edsvik
Hello
I have a small script that gets a RSS feed and displays it in a datagrid
like this:
<%@ Page Language="C#" Debug="true" %>
<%@OutputCache Duration="900" VaryByParam="none" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Xml" %>
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
RssWeather.DataSource =
GetRSSFeed("http://www.rssweather.com/rss.php?config=&forecast=zandh&place=p
hiladelphia+county&state=pa&zipcode=&country=us&county=42101&zone=PAZ071&alt
=rss20a");
RssWeather.DataBind();
}
private DataTable GetRSSFeed(string strURL)
{
DataSet ds = new DataSet();
ds.ReadXml(strURL);
return ds.Tables[2];
}
</script>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<asp
ataGrid id="RssWeather" Width="100%"
AlternatingItemStyle-BackColor="#eeeeee" HeaderStyle-Font-Size="12pt"
HeaderStyle-ForeColor="White" HeaderStyle-BackColor="Navy"
HeaderStyle-HorizontalAlign="Center" HeaderStyle-Font-Bold="True"
Font-Size="8pt" Font-Name="Arial" AutoGenerateColumns="false"
runat="server">
<Columns>
<asp:TemplateColumn HeaderText="Weather Forecast - Philadelphia
County">
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "title")
%></b><br/>
<%# DataBinder.Eval(Container.DataItem, "description") %>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp
ataGrid>
</body>
</html>
problem is that I would like it to show it like this:
Current Thursday Friday Saturday ......
value1 value2 value3 value4 .....
is there a way to "rotate" it so each columnname gets the value <%#
DataBinder.Eval(Container.DataItem, "title") %> and the value under it?
hope you guys understand what im mumbling about
TIA
/Lasse
I have a small script that gets a RSS feed and displays it in a datagrid
like this:
<%@ Page Language="C#" Debug="true" %>
<%@OutputCache Duration="900" VaryByParam="none" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Xml" %>
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
RssWeather.DataSource =
GetRSSFeed("http://www.rssweather.com/rss.php?config=&forecast=zandh&place=p
hiladelphia+county&state=pa&zipcode=&country=us&county=42101&zone=PAZ071&alt
=rss20a");
RssWeather.DataBind();
}
private DataTable GetRSSFeed(string strURL)
{
DataSet ds = new DataSet();
ds.ReadXml(strURL);
return ds.Tables[2];
}
</script>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<asp
AlternatingItemStyle-BackColor="#eeeeee" HeaderStyle-Font-Size="12pt"
HeaderStyle-ForeColor="White" HeaderStyle-BackColor="Navy"
HeaderStyle-HorizontalAlign="Center" HeaderStyle-Font-Bold="True"
Font-Size="8pt" Font-Name="Arial" AutoGenerateColumns="false"
runat="server">
<Columns>
<asp:TemplateColumn HeaderText="Weather Forecast - Philadelphia
County">
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "title")
%></b><br/>
<%# DataBinder.Eval(Container.DataItem, "description") %>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp
</body>
</html>
problem is that I would like it to show it like this:
Current Thursday Friday Saturday ......
value1 value2 value3 value4 .....
is there a way to "rotate" it so each columnname gets the value <%#
DataBinder.Eval(Container.DataItem, "title") %> and the value under it?
hope you guys understand what im mumbling about
TIA
/Lasse