Click here to Skip to main content
15,919,931 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Problem to Update my Record in FormView. Pin
hdv21218-Aug-07 10:44
hdv21218-Aug-07 10:44 
GeneralRe: Problem to Update my Record in FormView. Pin
DavidNohejl18-Aug-07 13:35
DavidNohejl18-Aug-07 13:35 
GeneralRe: Problem to Update my Record in FormView. Pin
Christian Graus18-Aug-07 15:50
protectorChristian Graus18-Aug-07 15:50 
GeneralRe: Problem to Update my Record in FormView. Pin
DavidNohejl19-Aug-07 1:51
DavidNohejl19-Aug-07 1:51 
QuestionRSS Files????Please help Pin
DarynRoberts18-Aug-07 3:51
DarynRoberts18-Aug-07 3:51 
AnswerRe: RSS Files????Please help Pin
Fred_Smith18-Aug-07 5:28
Fred_Smith18-Aug-07 5:28 
GeneralRe: RSS Files????Please help Pin
DarynRoberts19-Aug-07 21:20
DarynRoberts19-Aug-07 21:20 
GeneralRe: RSS Files????Please help Pin
Fred_Smith19-Aug-07 22:29
Fred_Smith19-Aug-07 22:29 
Well, honestly, I have never done this (consuming RSS feeds) before, but it took me all of 10 minutes to follow this example

http://aspnet.4guysfromrolla.com/articles/031903-1.aspx

and get it working. All I would say is, that you have to a) find out the URL of the RSS feed you want to xonsume - and most websites that have one will display it, or else search for it on Google; and b) you will probably have to examine the XML returned to ge the appropriate field names. You should also probably server.htmlencode the description field at least.

Here is my code for my working example: (Click thr button)
I'm afraid I'm out for thr day now, so you're on your own after this....
Fred

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Xml" %>
<script language="VB" runat="server">
Sub Page_Load(sender as Object, e as EventArgs)

End Sub

Sub btn_Click(ByVal sender As Object, ByVal e As EventArgs)
recentPosts.DataSource = GetRSSFeed("http://www.weathercommerce.net/rss4.xml")
recentPosts.DataBind()
End Sub

Function GetRSSFeed(strURL as String) as DataTable
'Get the XML data
Dim reader as XmlTextReader = New XmlTextReader(strURL)

'return a new DataSet
Dim ds as DataSet = New DataSet()
ds.ReadXml(reader)
Return ds.Tables("item")
End Function


</script>


<HTML>
<HEAD>
<title></title>
</HEAD>
<body >
<form id="Form1" runat="server">
<asp:DataGrid runat="server" id="recentPosts" AutoGenerateColumns="False"
Font-Names="Arial" Font-Size="10pt"
HeaderStyle-Font-Bold="True"
HeaderStyle-HorizontalAlign="Center"
HeaderStyle-BackColor="Navy" HeaderStyle-ForeColor="White"
HeaderStyle-Font-Size="15pt"
AlternatingItemStyle-BackColor="#eeeeee">
<Columns>
<asp:TemplateColumn HeaderText="Most Recent Posts">
<ItemTemplate>
<a href="<%# DataBinder.Eval(Container.DataItem, "link")%>">
<%# DataBinder.Eval(Container.DataItem, "title") %>
</a><br /><i><%#DataBinder.Eval(Container.DataItem, "description")%></i>
</ItemTemplate>

</asp:TemplateColumn>
</Columns>
</asp:DataGrid>

<asp:Button ID="btnX" runat="server" Text="Smack" OnCLick="btn_Click" />
</form>
</body>
</HTML>



QuestionPageIndexChanged not firing in DataGrid if EnableViewState is false Pin
Anees Mitha18-Aug-07 3:23
Anees Mitha18-Aug-07 3:23 
AnswerRe: PageIndexChanged not firing in DataGrid if EnableViewState is false Pin
Fred_Smith18-Aug-07 3:36
Fred_Smith18-Aug-07 3:36 
GeneralRe: PageIndexChanged not firing in DataGrid if EnableViewState is false Pin
Anees Mitha18-Aug-07 3:54
Anees Mitha18-Aug-07 3:54 
GeneralRe: PageIndexChanged not firing in DataGrid if EnableViewState is false Pin
Fred_Smith18-Aug-07 4:08
Fred_Smith18-Aug-07 4:08 
GeneralRe: PageIndexChanged not firing in DataGrid if EnableViewState is false Pin
Anees Mitha18-Aug-07 9:43
Anees Mitha18-Aug-07 9:43 
AnswerRe: PageIndexChanged not firing in DataGrid if EnableViewState is false Pin
DavidNohejl18-Aug-07 8:00
DavidNohejl18-Aug-07 8:00 
GeneralRe: PageIndexChanged not firing in DataGrid if EnableViewState is false Pin
Anees Mitha18-Aug-07 9:39
Anees Mitha18-Aug-07 9:39 
GeneralRe: PageIndexChanged not firing in DataGrid if EnableViewState is false Pin
DavidNohejl18-Aug-07 10:36
DavidNohejl18-Aug-07 10:36 
AnswerRe: PageIndexChanged not firing in DataGrid if EnableViewState is false Pin
K.P.Kannan18-Aug-07 15:13
K.P.Kannan18-Aug-07 15:13 
Questionwindow.showModalDialog problem Pin
codelinks18-Aug-07 2:38
codelinks18-Aug-07 2:38 
AnswerRe: window.showModalDialog problem Pin
Michael Sync19-Aug-07 7:21
Michael Sync19-Aug-07 7:21 
QuestionExtending Session Timing Pin
jithbiz003318-Aug-07 0:56
jithbiz003318-Aug-07 0:56 
AnswerRe: Extending Session Timing Pin
Fred_Smith18-Aug-07 1:40
Fred_Smith18-Aug-07 1:40 
GeneralRe: Extending Session Timing Pin
jithbiz003321-Aug-07 20:56
jithbiz003321-Aug-07 20:56 
QuestionGridView in asp.net Pin
Milind Panchal18-Aug-07 0:50
Milind Panchal18-Aug-07 0:50 
AnswerRe: GridView in asp.net Pin
jithbiz003318-Aug-07 0:54
jithbiz003318-Aug-07 0:54 
Questionproblem with validators in my form Pin
mrkeivan18-Aug-07 0:36
mrkeivan18-Aug-07 0:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.