Forum Moderators: open

Message Too Old, No Replies

asp.net/vb.net random file

random file generator

         

drengur

1:04 pm on Oct 18, 2005 (gmt 0)

10+ Year Member



I am trying to get a random XML file to be accessed for a online quiz (there are 4 files quiz1.xml to quiz4.xml)
and all is working APART for the random bit!

I have found a heap of random number generators but every time I try to use them I get error messages so I guess I'm doing something wrong....

here's what I have (that works):-


<script language="VB" runat="server">

'Relative file path to XML data
Dim strXmlFilePath as String = Server.MapPath("quiz.xml")

Dim xDoc as New XPathDocument(strXmlFilePath)
Dim xNav as XPathNavigator = xDoc.CreateNavigator
Dim xNodeIterator as XPathNodeIterator

can anyone show me some way to pull a random XML file up? any help would be muchly appreciated.

drengur

12:20 am on Oct 19, 2005 (gmt 0)

10+ Year Member



I have a question...... I have posted more than a few times on forums and never seem to get a reply - my questions seem straightfoward and fairly simple, so I don't understand why. am I not providing enough info? do I phrase things wrongly? it's driving me up the wall!

markbaa

3:23 am on Oct 25, 2005 (gmt 0)

10+ Year Member



It's a specialised question, you'll probably get a better response at a more focussed forum.

The best form for asp.net issues is www.asp.net (run by Microsoft I think).

mattglet

2:12 pm on Oct 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First show your random number generator. Once that gets working, it's pretty easy to tie that into your XML grabber.