Helge, You may be able to use the same code, just load the xml again AFTER the user updates it. Only if the page is posting would you update the xml file. Otherwise, your code would be the same:
If Page.IsPostBack Then 'call code to update your xml file. End If 'Call code here to get & display the xml file. The first If statement will evaluate to true if the user submits the page. Call your code to update the xml file. Then if continues and loads the xml file. If the user is coming to the page for the first time, which would means the page is NOT posting, the If statement is false and gets passed over. You will then continue to the second part and load your xml file. Bottom line, you only need to check for the page posting in order to update your xml file and the rest should take care of itself. Mark --- Helge Thomas Hellerud <[EMAIL PROTECTED]> wrote: > Mark, > > > > I load the XML file using the Page_Load method. so > then I'm afraid it is > loaded before it is updated. I wonder how I can load > the XML after it is > updated .? What else than Page_Load can I use? > > > > Helge > > > > _____ > > From: [email protected] > [mailto:[EMAIL PROTECTED] On > Behalf Of Mark E > Sent: 23. juli 2005 16:57 > To: [email protected] > Subject: Re: [AspNetAnyQuestionIsOk] Page_Load > > > > Helge, > > Are you loading the original xml file before the > user > updates it? > > Mark > > --- Helge Thomas Karset Hellerud > <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > I have a module where the user updates a XML file > > based on what is > > written in a form. When the page loads after the > > user has clicked the > > button, I want to read the updated XML file, so > the > > user doesn't need > > to refresh the page manually to see the updated > > file. > > > > When the button is clicked, using the Page_Load > > method, the old XML file > > will be loaded. How can the updated XML file be > > loaded when the page > > loads after the user has clicked the button? > > > > Thanks in advance. > > > > Helge > > > > > > > _____ > > YAHOO! GROUPS LINKS > > > > * Visit your group "AspNetAnyQuestionIsOk > <http://groups.yahoo.com/group/AspNetAnyQuestionIsOk> > " on the web. > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED] > e> > > * Your use of Yahoo! Groups is subject to the > Yahoo! > <http://docs.yahoo.com/info/terms/> Terms of > Service. > > > > _____ > > > > [Non-text portions of this message have been > removed] > > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
