Re: Multiple Page_load



Since you are not using codebehind, you should just be able to define a
Page_Load method. The following code is in C#

<%@Page Language="C#">

<!-- All your html code in here -->

<script runat="server">
void Page_Load( object sender, EventArgs e )
{
//set the label in here.
}

</script>

Is this what you are after?

bill

"tshad" <tscheiderich@xxxxxxxxxxxxxxx> wrote in message
news:%23SMrf0jVFHA.2768@xxxxxxxxxxxxxxxxxxxxxxx
> "William F. Robertson, Jr." <theman@xxxxxxxxxx> wrote in message
> news:%239sXbHjVFHA.2700@xxxxxxxxxxxxxxxxxxxxxxx
> >A couple options:
> >
> > 1. Wire to the Page.Load event that way it will remain seperate from
each
> > page's Load method.
> > 2. Derive all your pages from myPages.myPage. And in myPage, do your
> > load
> > logic. Each derived class (page) will have the name logic on load
called,
> > but won't see it, nor will you have to worry about updating X number
> > pages,
> > if you are copying and pasting it.
>
> Not quite sure how to do that.
>
> I am not using code/behind at the moment, so not sure if that is an issue.
>
> Why does the user control not have a problem?
>
> Tom
> >
> > bill
> >
> >
> > "tshad" <tscheiderich@xxxxxxxxxxxxxxx> wrote in message
> > news:uD$cpwaVFHA.2768@xxxxxxxxxxxxxxxxxxxxxxx
> >> Is there a way to do put Page_loads on a page?
> >>
> >> I am trying to setup a Page_Load that just puts a persons name that is
> >> logged on at the top of a page the first time a page is loaded.
> >>
> >> In my template (which would be copied to each page) would have this in
> >> it.
> >> The each page has its own Page handling for the first time it is
loaded,
> >> also Page_load.
> >>
> >> This seems to work fine if it is in a User Control.
> >>
> >> Thanks,
> >>
> >> Tom
> >>
> >>
> >
> >
>
>


.



Relevant Pages

  • RE: page.init vs page.load
    ... But the major difference is Page_Load will be ... the page loads for the first time. ... Currently in the page_load of the user control I do ... > If I need those things to be available to me on the page load, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: page.init vs page.load
    ... The problem I'm having is that this is in a user control that I'm doing the ... the page load, then everything in the page load for the user control. ... > problems loading your page then I would keep all your stuff in Page_Load. ... >> the page loads for the first time. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Multiple Page_load
    ... > page's Load method. ... Tom ... >> logged on at the top of a page the first time a page is loaded. ... >> This seems to work fine if it is in a User Control. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Windows User Control wont load in IE browser!
    ... Execute" while its should be "Script Only". ... I load through a Web Form using the OBJECT tag. ... Verifies the file structure the User Control uses. ... machine where IIS is installed, this is also the same machine the User ...
    (microsoft.public.dotnet.security)
  • Re: Server.Transfer goes to wrong page
    ... long-running pages as a countdown during load. ... it was a client-side redirect, I never caught it in my debugger. ... >>preserveForm), the first time, it loads up BasicReports again. ...
    (microsoft.public.dotnet.framework.aspnet)