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.
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.