Click to See Complete Forum and Search --> : Problems with asp:DataRepeater


JoseMadrid
04-19-2007, 04:22 AM
Hi all,

I´m having a problem with a asp:DataRepeater. In code I asign the DataSourceId.Data each time I load the page that contains the DataRepeater. This page is only for information pourpuses, so, the page is loaded and them is closed. No action is avaible in it.

The DataRepeater in declared like...

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="XmlDataSource1" >

and each time I load the page I use this code...

XmlDataSource1.Data = strXML;
Repeater1.DataBind();

Data are loaded using XPath (because strXML is an xml string variable).

The problem is that each time I load the page, the repeater loads the data loaded the first time the page was opeded (debugging I´ve seen strXML changes and contains the requested data).

Any idea???

Thnx

PeOfEo
04-19-2007, 10:28 AM
Well then that DataBind method must not be firing at all. That code isn't in an if not is post back or anything?

Have a look at this
http://msdn2.microsoft.com/en-us/library/system.web.ui.xpathbinder.aspx