Brand new to xml and I'm trying to get Scott Mitchell's rss aggregator example working locally. Basically, involves a frameset with the channels(feeds) in the left frame, a list of items in the channel in the lower right, and the single item in the top right based on a selection in the lower right. When the channel within the left frame is clicked, bottom right frame changes with the items for the channel (feed). Taking it step-by-step. Have left frame loading from sql2005 and it's working great. Next I'm working on the list of items in the bottom right frame. (don't event have the soure identified in the top right as yet). Problem is, he wrote it in C and I don't have a clue. Converted it, but I'm having problems. Anybody able to provide simplistic help for a newbie? right now, it's stopping with an error of:
System.FormatEx ception: Input string was not in a correct format.
for the line:
Dim feedXML As XmlDocument = CType(Cache("ch annel" + channelID), XmlDocument) - <%@ Import Namespace="System.Web.UI.WebControls" %>
-
<%@ Import Namespace="System.Data" %>
-
<%@ Import Namespace="System.Data.SqlClient" %>
-
<%@ Import Namespace="System.Xml" %>
-
<%@ Import Namespace="System.Xml.xsl" %>
-
<%@Page Language="VB" debug="True"%>
-
<script language="vb" runat="server">
-
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
-
Dim channelID As Integer
-
if Request.QueryString("channelID")="" then channelID=0 else channelID=Int32.Parse(Request.QueryString("channelID"))
-
Dim feedXML As XmlDocument = CType(Cache("channel" + channelID), XmlDocument)
-
If feedXML Is Nothing Then
-
Dim myConnection As SqlConnection = New SqlConnection("connect stuff;")
-
Dim SQL_QUERY As String = "SELECT URL, UpdateInterval FROM its.dbo.xTblRssChannels WHERE channelID = @channelID"
-
Dim myCommand As SqlCommand = New SqlCommand(SQL_QUERY, myConnection)
-
Dim feedParam As SqlParameter = New SqlParameter("@channelID", SqlDbType.Int, 4)
-
feedParam.Value = channelID
-
myCommand.Parameters.Add(feedParam)
-
myConnection.Open
-
Dim reader As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)
-
reader.Read
-
Dim feedURL As String = reader("URL").ToString
-
Dim updateInterval As Integer = Int32.Parse(reader("UpdateInterval").ToString)
-
myConnection.Close
-
feedXML = New XmlDocument
-
feedXML.Load(feedURL)
-
Cache.Insert("channel" + channelID, feedXML, Nothing, DateTime.Now.AddMinutes(updateInterval), TimeSpan.Zero)
-
End If
-
xmlNewsItems.Document = feedXML
-
Dim xsltArgList As Xsl.XsltArgumentList = New XsltArgumentList
-
xsltArgList.AddParam("channelID", "", channelID)
-
xmlNewsItems.TransformArgumentList = xsltArgList
-
End Sub
-
</script>
-
<script language="javascript">
-
// display a blank page in the bottom frame when the news items loads
-
parent.rbottom.location.href = "about:blank";
-
</script>
-
</head>
-
<body>
-
<form id="Form1" method="post" runat="server">
-
<asp:Xml id="xmlNewsItems" runat="server" TransformSource="rssItems.xslt"></asp:Xml>
-
</body>
-
</HTML>
0 1334 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Philippe C. Martin |
last post by:
Hi,
Is there a program out there that would generate the C code to instantiate
objects and call them:
ex: miracle.exe -i mymodule.py -o module_internface.c ?
I seem to recall a _yes_ to that but I got a memory overflow :-)
Thanks,
|
by: Twayne |
last post by:
Twayne wrote:
That's the verification I was looking for I think. There are times that
doesn't seem to be so, but perhaps I'll looking at the wrong side of the
tree in the wrong forest ... I think I let POST usages confuse me.
....
D'oh! No, I hadn't thought of looking at the souce in my browser!
Nothing like being half-armed and half-fast, huh? Guess I better switch
|
by: Banibrata Dutta |
last post by:
Hi,
I've gone through the list of "language differences" between 2.3 / 2.4
& 2.5 of CPython. I've spend around 2 weeks now, learning v2.5 of
CPython, and I consider myself still very very newbie. So, unable to
take a call as to how-important or desirable the newer language
features are -- so whether to write my app for v2.5 of Python, versus,
as few others on this list have recommended, i.e. to stick to v2.3 ??
Are the preformance...
|
by: Raxit |
last post by:
Hi,
i was reading/learning some hello world program in python.
I think its very simillar to Java/C++/C#. What's different (except
syntax) ?
what can i do easily with python which is not easy in c++/java !?
Tnx,
Raxit
|
by: Peter Michaux |
last post by:
On May 14, 8:55 pm, Prisoner at War <prisoner_at_...@yahoo.comwrote:
Get it from the library. I cannot imagine needing to own an HTML book.
There are plenty of good references on the web. Understand that XHTML
is not for the general web. HTML is a better option.
I own Eric Meyer's "CSS: The Definitive Guide" and am glad that I do.
It is the best definitive guide I've read on any web topic.
"Bullet Proof Web Design" is the best book...
| |
by: r_ahimsa_m |
last post by:
Could you recommend me some free JavaScript validator? I was using JSlint
but it reports nonsense errors.
Please help. Thanks.
/RAM/
|
by: raylopez99 |
last post by:
Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good
newbie ASP.NET book?
Subject: Will ASP.NET 3.0 work under Visual Studio 2005? And what is a
good newbie ASP.NET book?
My question is in the title. I have experience with C#, SQL, C++/CLI
and have done exercises in a book on database design, so I'm not a
total beginner, but a recommendation for an intermediate book on
ASP.NET is appreciated.
|
by: Lokean |
last post by:
Sorry for this newbie question, this is not my realm of expertese.
I have searched google, tried several applications that claim they can do this, such as Mapforce, which I found confusing, to Oxygen, to HTML kit, et cetera.
I am more confused than ever.
here's my quandry.
I was sent a file and told that we need to get the data into a more readable form.
I've tried using apps to pull it in, but it's not displaying properly.
|
by: Dave |
last post by:
I am new to Visual Web Developer 2005 Expres.
I am using absolute positioning and every time I add a button control to my
web form its width extends all the way to the edge of the page. IOW I get a
long skinny button that extends to the right side of the browser.
This does not appear to happen with other controls. Any idea why it happens
to the button?
Here is how the button looks in source code:
|
by: SharkD |
last post by:
Hi!
I'm a total newbie when it comes to ASP (or any type of server-side
programming).
I want to start a project that does the following:
1. query Wikipedia for information regarding articles using the
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |