repeater not refreshing data

Discussion in '.NET' started by cjen461, Nov 14, 2006.

  1. cjen461

    cjen461

    Joined:
    Nov 13, 2006
    Messages:
    2
    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.
    cjen461, Nov 14, 2006
    #1
    1. Advertising

  2. cjen461

    cjen461

    Joined:
    Nov 13, 2006
    Messages:
    2
    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>
    cjen461, Nov 14, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pv_kannan@yahoo.com

    Datagrid not refreshing with new data

    pv_kannan@yahoo.com, Sep 30, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,720
    Rob Schieber
    Sep 30, 2005
  2. Joe Bloggs
    Replies:
    2
    Views:
    1,688
    Joe Bloggs
    Apr 9, 2005
  3. Harlan Messinger

    Self-refreshing and non-self-refreshing controls

    Harlan Messinger, Aug 4, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    445
    =?Utf-8?B?Y2xpY2tvbg==?=
    Aug 4, 2006
  4. Harlan Messinger

    Self-refreshing and non-self-refreshing controls

    Harlan Messinger, Aug 3, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    180
    Harlan Messinger
    Aug 3, 2006
  5. halligas@gmail.com

    Data in Datalist not refreshing

    halligas@gmail.com, Jun 7, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    149
    halligas@gmail.com
    Jun 7, 2007
Loading...

Share This Page