i have xml feeds live.
I would like to show data without refresh.
I used code for this but when I changes data then to show data i need to show without refresh.
Notice 2 controls, xmlcontent and lbldatetime. I don't know how you show your data now, so if this is not a label, replace xmlcontent by your control. The lbldatetime label is just to check that refresh (every 10 sec) is occurred.
This both examples shows how to use without refresh but when i updated xml feeds not refresh and i need to click button "refresh" on the browser.
So, I need if is possible when i updated xml feeds to update in default.aspx website.
For this I have the code but problem is because if i use for each 1000ms refresh works but problem is if is marked my text on the website (all select) this text then unselect when i refreshed website every 1000ms.
I checked other website and this is works...
Participant
753 Points
2611 Posts
live xml feeds
Dec 05, 2013 01:54 PM|programercek|LINK
Hi,
i have xml feeds live.
I would like to show data without refresh.
I used code for this but when I changes data then to show data i need to show without refresh.
Help
All-Star
35159 Points
9075 Posts
Re: live xml feeds
Dec 05, 2013 02:21 PM|smirnov|LINK
You can use jquery/ajax, you can use asp.net controls such as Timer and UpdatePanel, etc
Since it was asked in xml forum, I can show an example with UpdatePanel
Notice 2 controls, xmlcontent and lbldatetime. I don't know how you show your data now, so if this is not a label, replace xmlcontent by your control. The lbldatetime label is just to check that refresh (every 10 sec) is occurred.
In the code-behind
Hope this helps.
Participant
753 Points
2611 Posts
Re: live xml feeds
Dec 05, 2013 02:28 PM|programercek|LINK
Yes but if i used your code always to use refresh...
I means... If I have label1.text="TEST" and then to go in default.aspx and market TEXT, when i refreshed TEXT is unmarked.
All-Star
35159 Points
9075 Posts
Re: live xml feeds
Dec 05, 2013 02:32 PM|smirnov|LINK
It will refresh only controls inside ContentTemplate. If label1 is outside of ContentTemplate and UpdatePanel then it will not be refreshed.
Participant
753 Points
2611 Posts
Re: live xml feeds
Dec 05, 2013 02:53 PM|programercek|LINK
I know that but problem is because i want to use if i changes TEXT to TEST2 when i marked no want refresh..
This has sportsbook (live events) if i marked all text then when i updated xml feeds live still marked all test.
is possible like this? I think yes because this has other website...
All-Star
15648 Points
2151 Posts
Re: live xml feeds
Dec 09, 2013 04:42 AM|Happy Chen - MSFT|LINK
hi programercek,
Yes, it is possible to show without refresh via jquery load data.
I would suggest you try to read the links below:
Parse an RSS Feed with jQuery
http://codeforbrowser.com/blog/parse-an-rss-feed-with-jquery/
XML Parsing with jQuery
http://tech.pro/tutorial/877/xml-parsing-with-jquery
Hope they can help you.
Participant
753 Points
2611 Posts
Re: live xml feeds
Dec 09, 2013 05:39 AM|programercek|LINK
This both examples shows how to use without refresh but when i updated xml feeds not refresh and i need to click button "refresh" on the browser.
So, I need if is possible when i updated xml feeds to update in default.aspx website.
For this I have the code but problem is because if i use for each 1000ms refresh works but problem is if is marked my text on the website (all select) this text then unselect when i refreshed website every 1000ms.
I checked other website and this is works...
Participant
960 Points
288 Posts
Re: live xml feeds
Dec 12, 2013 09:45 PM|galeny|LINK
you should provide a simple demo, which can easily reproduce the problem.