Last post Dec 12, 2013 09:45 PM by galeny
Dec 05, 2013 01:54 PM|programercek|LINK
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.
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
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:Timer runat="server" id="UpdateTimer" interval="10000" ontick="UpdateTimer_Tick" />
<asp:UpdatePanel runat="server" id="TimedPanel" updatemode="Conditional">
<asp:AsyncPostBackTrigger controlid="UpdateTimer" eventname="Tick" />
<asp:Label runat="server" id="lbldatetime" />
<asp:Label runat="server" id="xmlcontent" />
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
protected void UpdateTimer_Tick(object sender, EventArgs e)
lbldatetime.Text = DateTime.Now.ToString();
xmlcontent.Text = "rss...";
Hope this helps.
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.
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.
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...
Dec 09, 2013 04:42 AM|Happy Chen - MSFT|LINK
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
XML Parsing with jQuery
Hope they can help you.
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...
Dec 12, 2013 09:45 PM|galeny|LINK
you should provide a simple demo, which can easily reproduce the problem.