Forget about Page_Load. Your problem has nothing to do with Page_Load.
Page_Load is simply an event that happens, among many others. You have
defined a Sub that executes a certain functionality. Now, are you saying
that this Sub runs EVERY TIME the page is requested, regardles of PostBack
or any user events? If not, precisely what conditions cause this Sub to run?
Also, is there any code in the page, or in any of the controls in the page,
that calls this Sub?
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
louise raisbeck said:
ok i have a function in my aspx.vb code behind page called get_xml. it
does some reading on an xml file and returns it to the browser. But i only
want it to fire when a button is clicked so i have this on my aspx page:
<input type="button" id="getxmlbutton" onserverclick="get_xml" value="edit xml" runat="server">
and this function in my aspx.vb CB page
Sub get_xml(ByVal sender As System.Object, ByVal e As System.EventArgs)
blah blah
End Sub
my page_load is empty. But instead of this function waiting for the button
to fire the event on the onserverclick, it runs it on load, so it goes and
fetches xml before the user has even entered an xml file in a field. why is
it running the function?