Hey I have a XML Feed which is sometimes slow to connect to making my front page quite slow to load sometimes.
I load it as follows
Try
XmlDataSource.DataFile = "http://www.rte.ie/rss/news.xml"
XmlDataSource.XPath = "rss/channel/item [position()<=3]"
dlRSS.DataSource = XmlDataSource
dlRSS.DataBind()
Catch ex As Exception
End Try
Try
XmlDataSource1.DataFile = "http://mediaone.kantarmedia.ie/publish/rss.jsp?id=8"
XmlDataSource1.XPath = "rss/channel/item [position()<=3]"
DataList1.DataSource = XmlDataSource1
DataList1.DataBind()
Catch ex As Exception
End Try
How Can I set a timer on these i.e give it 5 secs if it doesnt load, just forget it and go straight to catch for example