If I'm not mistaken, during the Page_Init, I don't have access to the
Request.Form, Request.QueryString or Viewstate even because they are
not loaded yet. I'm just new and trying to learn about the Page
Lifecycle. What I should be doing (I think) is trapping the button
click event and put my logic there. I think the button click event is
raised on the server before the Page_Load, but after everything is
loaded which is what I want. Further, this is ASP.NET's whole point I
think, that is, to make everything behave like a "Client-Server" app.
Anyway, I'm simply trying to write a Login and Logoff component (which
every ASP.NET developer ends up writing as an exercise early on I'm
sure) and I'm learning the hard way what Page LifeCycle means and
such. I've since read, in fact, that it's not good to directly access
the Page.Request or Page.Form anymore. Instead, it's good to override
methods that are part of the Page Lifecycle. I'm still learning I
guess!
Thanks,
Dave
"GrantMagic" <gr***@magicalia.com> wrote in message news:<#A**************@TK2MSFTNGP11.phx.gbl>...
Are you looking for Page_Init?
void Page_Init(Object sender, EventArgs e)
{
//Pre page load requests here
}
"malcolm" <ch********@yahoo.com> wrote in message
news:4f**************************@posting.google.c om... Inside of a Page class, how do I capture the Request object values
before the Page_Load event is called of that Page? I have a situation
where I have many server controls on a Page that get created in the
constructor of my Page, but I need them to know about some info that
get's set via the Page_Load from the Request (and even Session for
that matter)
thanks!
Dave