repeater not refreshing data

Joined
Nov 13, 2006
Messages
2
Reaction score
0
I have a repeater and it's item template defined in a .aspx page.

In the page_load method of the cs file the aspx page uses, I put the data I want into an XmlDataSource, set the DataSourceId of of the repeater to that of the XmlDataSource and bind it. The data I grab depends on a parameter in the query string.

Now this works just fine when I don't enter anything in the url for the query parameter (I have a default and it uses the default just fine). But when I type in a value for the parameter and refresh the page, the repeater is the same as before.

Other values that depend on the query parameter refresh just fine and even the XmlDataSource seems to refresh (I spit it out into a textbox and it shows just what I want it to). Here's my page_load:

protected void Page_Load(object sender, EventArgs e)
{

initializeRegion_cd();
initializeRegion_nm();
initializeCountiesList();
initializeImageTypeId();


DataSet ds;

Washington.ECY.WR.WaterRights.ROE.Business.Interface.IWaterRightManager wrMgr = BusinessFactory.GetWaterRightManager();

ds = wrMgr.GetPublishImages(region_cd, imageTypeId, false);



XmlDocument reportXML = new XmlDocument();
reportXML.LoadXml(ds.GetXml());



XmlDataSource2.Data = reportXML.OuterXml;
XmlDataSource2.DataBind();

XMLTextBox.Text = XmlDataSource2.Data;

Repeater1.DataSourceID = "XmlDataSource2";
Repeater1.DataBind();

}

My query parameter is region_cd and the 4 initialize functions use it just fine and the query that fills ds also uses it properly.



I'm probably missing something obvious, but I don't know how to make that repeater work.
 
Joined
Nov 13, 2006
Messages
2
Reaction score
0
here's a snipet for the repeater in the aspx page:


<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<tr>
<td width="17%" style="border-bottom-style: solid; border-bottom-width: 1px">
<p align="center"><%#GetAndFormatDate("publish_start_dt")%></p>
</td>
<td width="17%" style="border-bottom-style: solid; border-bottom-width: 1px">
<p align="center"><%#GetAndFormatDate("publish_end_dt")%></p>
</td>
<td width="30%" style="border-bottom-style: solid; border-bottom-width: 1px">
<a href="http://???<%#XPath("image_file_path_ds")%>/<%#XPath("image_file_base_nm")%>.<%#XPath("image_file_extension_nm")%>">
<%#XPath("wr_doc_file_nr")%> <%#XPath("image_type_nm")%></a> for <%#XPath("wr_doc_cert_nm")%>
</td>
<td width="17%" style="border-bottom-style: solid; border-bottom-width: 1px">
<p align="center"><%#GetAndFormatCounty("county_nm")%></p>
</td>
<td width="19%" style="border-bottom-style: solid; border-bottom-width: 1px">
<p align="center"><a href="SchedulePublication.aspx?wrDocImagePublishId=<%#XPath("wr_doc_image_publish_id")%>">
Change Publication Dates</a></p>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top