Home All Groups Group Topic Archive Search About

GridView and XmlDataSource not refreshing.

Author
16 Mar 2006 9:22 PM
Scott Kelley
I am populating a GridView with and XmlDataSource.  when I first load the
grid, everything is OK.  If the data changes and I refresh the page, the old
data continues to be there.  If I stop the project, recompile the web, and
restart, then I will see my new values.  I think it is a caching issue but I
have turned off the view state and I don't know where else to go.  My
page_load is pretty simple.  If anyone has any ideas, it would be
appreciated.

   protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // Retrieve the application data.
            CRAdminWS objAdmin = new CRAdminWS();
            CallProcessor objCP = new CallProcessor();

            // Get the data and create XML Data source.  This call retrieves
the xml in a string.
            string strAppsXml =
objCP.ProcessCenRegCall(objAdmin.ApplicationGet("CRSADMIN", null));

            XmlDataSource objXmlDS = new XmlDataSource();
            objXmlDS.Data = strAppsXml;
            objXmlDS.TransformFile = "~/RemapApplications.xsl";

            // Setup the grid with the data source and bind it.
            gvApplications.DataSource = objXmlDS;
            gvApplications.DataBind();
        }
    }

Author
26 Mar 2006 10:58 PM
DWS
Scott,

Your not reloading on postback?  where is your reload code?
Please send group more information


Good Luck
DWS

Show quoteHide quote
"Scott Kelley" wrote:

> I am populating a GridView with and XmlDataSource.  when I first load the
> grid, everything is OK.  If the data changes and I refresh the page, the old
> data continues to be there.  If I stop the project, recompile the web, and
> restart, then I will see my new values.  I think it is a caching issue but I
> have turned off the view state and I don't know where else to go.  My
> page_load is pretty simple.  If anyone has any ideas, it would be
> appreciated.
>
>    protected void Page_Load(object sender, EventArgs e)
>     {
>         if (!IsPostBack)
>         {
>             // Retrieve the application data.
>             CRAdminWS objAdmin = new CRAdminWS();
>             CallProcessor objCP = new CallProcessor();
>
>             // Get the data and create XML Data source.  This call retrieves
> the xml in a string.
>             string strAppsXml =
> objCP.ProcessCenRegCall(objAdmin.ApplicationGet("CRSADMIN", null));
>
>             XmlDataSource objXmlDS = new XmlDataSource();
>             objXmlDS.Data = strAppsXml;
>             objXmlDS.TransformFile = "~/RemapApplications.xsl";
>
>             // Setup the grid with the data source and bind it.
>             gvApplications.DataSource = objXmlDS;
>             gvApplications.DataBind();
>         }
>     }
>
>
>